Use GAE remote api with local (dev) installation

Does anyone find to use the GAE remote api, but instead of connecting to AppEngine to connect to localhost? Of course, for development purposes

+4
source share
4 answers

Have you tried the development console ? To access it, go to this address: http: // localhost: 8080 / _ah / admin .

If you really want to use the remote API, check out this article . I believe that you can use dev_server by passing the local host URL to the interactive console script.

+2
source

I managed to get this working by adding the following to the app.yaml file

builtins: - remote_api: on 

and then from the command line you can access the db, users, urlfetch or memcache modules

 remote_api_shell.py -s localhost:8080 

This will give you an email and password request, but that doesn't matter right now. remote_api_shell.py is in my path from the google engine directory.

+4
source

For Java, see this document that explains both local and remote access https://developers.google.com/appengine/docs/java/tools/remoteapi#Configuring_Remote_API_on_the_Client

+1
source

If there are ones like me who prefer to execute from a python script rather than a shell:

 from google.appengine.ext.remote_api import remote_api_stub remote_api_stub.ConfigureRemoteApiForOAuth('localhost:8081', '/_ah/remote_api', secure=False) os.environ['SERVER_SOFTWARE'] = 'Development' os.environ['HTTP_HOST'] = 'localhost:8080' ... do stuff ... 

I start the dev server with the parameter "--api_port 8081", otherwise just look at the port used in the dev server logs ("Starting the API server on ...").

Environment settings should be able to use the cloudstorage api for the dev server.

0
source

Source: https://habr.com/ru/post/1309541/


All Articles