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.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/datastore_admin/remote_api_put_stub.py/configure_remote_put