def ConfigureRemoteApiFromServer(server, path, app_id, services=None, default_auth_domain=None, use_remote_datastore=True):
 if (services is None):
  services = set(ALL_SERVICES)
 else:
  services = set(services)
  unsupported = services.difference(ALL_SERVICES)
  if unsupported:
   raise ConfigurationError(('Unsupported service(s): %s' % (', '.join(unsupported),)))
 os.environ['APPLICATION_ID'] = app_id
 os.environ.setdefault('AUTH_DOMAIN', (default_auth_domain or 'gmail.com'))
 apiproxy_stub_map.apiproxy = apiproxy_stub_map.APIProxyStubMap()
 if (('datastore_v3' in services) and use_remote_datastore):
  services.remove('datastore_v3')
  datastore_stub = RemoteDatastoreStub(server, path)
  apiproxy_stub_map.apiproxy.RegisterStub('datastore_v3', datastore_stub)
 stub = RemoteStub(server, path)
 for service in services:
  apiproxy_stub_map.apiproxy.RegisterStub(service, stub)

def ConfigureRemoteApiFromServer ( server , path , app_id , services = None , default_auth_domain = None , use_remote_datastore = True ) : if ( services is None ) : services = set ( ALL_SERVICES ) else : services = set ( services ) unsupported = services . difference ( ALL_SERVICES ) if unsupported : raise ConfigurationError ( ( 'Unsupported service(s): %s' % ( ', ' . join ( unsupported ) , ) ) ) os . environ [ 'APPLICATION_ID' ] = app_id os . environ . setdefault ( 'AUTH_DOMAIN' , ( default_auth_domain or 'gmail.com' ) ) apiproxy_stub_map . apiproxy = apiproxy_stub_map . APIProxyStubMap ( ) if ( ( 'datastore_v3' in services ) and use_remote_datastore ) : services . remove ( 'datastore_v3' ) datastore_stub = RemoteDatastoreStub ( server , path ) apiproxy_stub_map . apiproxy . RegisterStub ( 'datastore_v3' , datastore_stub ) stub = RemoteStub ( server , path ) for service in services : apiproxy_stub_map . apiproxy . RegisterStub ( service , stub )
does necessary setup to allow easy remote access to app engine apis .