def execute_batch_request(gd_client): # Feed that holds the batch request entries. request_feed = # Create a ContactEntry for the retrieve request. retrieve_contact = = text='') # Create a ContactEntry for the create request. create_contact = ='Elizabeth Bennet'),'Elizabeth'),'Bennet'))'', primary='true', # Retrieve the ContactEntry to update. update_contact = gd_client.GetContact('') = 'New Name' = 'New' = 'Name' # Retrieve the ContactEntry to delete. delete_contact = gd_client.GetContact('') # Insert the entries to the batch feed. request_feed.AddQuery(entry=retrieve_contact, batch_id_string='retrieve') request_feed.AddInsert(entry=create_contact, batch_id_string='create') request_feed.AddUpdate(entry=update_contact, batch_id_string='update') request_feed.AddDelete(entry=delete_contact, batch_id_string='delete') # submit the batch request to the server. response_feed = gd_client.ExecuteBatch(request_feed, '') for entry in response_feed.entry: print '%s: %s (%s)' % (entry.batch_id.text, entry.batch_status.code, entry.batch_status.reason) return response_feed