windows - how to access google datastore from an installed application on PC written in Python? -
i have entities added on datastore - made little web app (in python) read , write datastore through endpoints. able use webapp through endpoints javascript. want access web app installed application on pc. there way access endpoints installed applications written in python? how?
is there other way access datastore pc installed applications written in python?
that's 1 of beauties of appengine's endpoints. should use python client library google's apis communicate endpoints
pip install --upgrade google-api-python-client
then you'll construct resource object communicate api using apiclient.discovery.build function. eg:
from apiclient.discovery import build api_root = 'https://<app_id>.appspot.com/_ah/api' api = 'api_name' version = 'api_version' discovery_url = '%s/discovery/v1/apis/%s/%s/rest' % (api_root, api, version) service = build(api, version, discoveryserviceurl=discovery_url)
you can perform operations @ service.<endpoint_method>
etc
a more complete example authentication can found here.
edit:
or @zig recommends, directly use google cloud api
pip install googledatastore
Comments
Post a Comment