def configure_remote_put(remote_url, app_id, extra_headers=None):
 if ((not app_id) or (not remote_url)):
  raise ConfigurationError('app_id and remote_url required')
 original_datastore_stub = apiproxy_stub_map.apiproxy.GetStub('datastore_v3')
 if isinstance(original_datastore_stub, DatastorePutStub):
  logging.info('Stub is already configured. Hopefully in a matching fashion.')
  return
 datastore_stub = DatastorePutStub(remote_url, app_id, extra_headers, original_datastore_stub)
 apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', datastore_stub)

def configure_remote_put ( remote_url , app_id , extra_headers = None ) : if ( ( not app_id ) or ( not remote_url ) ) : raise ConfigurationError ( 'app_id and remote_url required' ) original_datastore_stub = apiproxy_stub_map . apiproxy . GetStub ( 'datastore_v3' ) if isinstance ( original_datastore_stub , DatastorePutStub ) : logging . info ( 'Stub is already configured. Hopefully in a matching fashion.' ) return datastore_stub = DatastorePutStub ( remote_url , app_id , extra_headers , original_datastore_stub ) apiproxy_stub_map . apiproxy . RegisterStub ( 'datastore_v3' , datastore_stub )
does necessary setup to intercept put .