You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud datastore access to appengine python with out Managed vm or Compute engine. #405
All the demos and guides shows how to access cloud datastore from python on GCE or from local machine, but is it possible to access cloud datastore from python hosted on a GAE ?
@sasivarunan It is on our todo list, but you can use the datastore directly using ndb.
Is there a reason you can't or don't want to do this?
The most difficult part for you will be auth, but IIRC you can get an access token for the service account associated with you app. (It's possible in Go, for example, which means the underlying RPC is available in Python.)
I've gotta run but will look into this more. You should check out how to create a Credentials object from the oauth2client library with only an access token.
I see. It's not a typical use case. Do you actually need to access more than one datastore instance or do you instead need non-App Engine clients to access the same one?
Update, you can get an access token for the application via the app_identity API. Luckily the oauth2client.appengine.AppAssertionCredentials class supports this.
You can use these credentials with this library via the following:
Activity
dhermes commentedon Dec 3, 2014
@sasivarunan It is on our todo list, but you can use the datastore directly using
ndb.Is there a reason you can't or don't want to do this?
The most difficult part for you will be auth, but IIRC you can get an access token for the service account associated with you app. (It's possible in Go, for example, which means the underlying RPC is available in Python.)
I've gotta run but will look into this more. You should check out how to create a
Credentialsobject from theoauth2clientlibrary with only an access token.sasivarunan commentedon Dec 3, 2014
I guess with
ndbi can only access only native datastore associated with my app id not a cloud datastoredhermes commentedon Dec 3, 2014
I see. It's not a typical use case. Do you actually need to access more than one datastore instance or do you instead need non-App Engine clients to access the same one?
sasivarunan commentedon Dec 3, 2014
need to access more than one datastore instance
thanks
dhermes commentedon Dec 3, 2014
Update, you can get an access token for the application via the
app_identityAPI. Luckily theoauth2client.appengine.AppAssertionCredentialsclass supports this.You can use these credentials with this library via the following:
I have not tested this yet, so am not 100% sure (will try to later).
Also, I am not closing this bug since we'd like to support this.
dhermes commentedon Dec 4, 2014
I'm closing out. @sasivarunan feel free to follow along in #335 where I'll be addressing this and much more shortly.
chore(main): release 2.1.0 (#405)
docs(samples): update samples to include new parent levels (folder an…
10 remaining items
build(deps): bump requests to 2.31.0 [autoapprove] (#405)
chore(main): release 2.13.0 (#405)
chore(main): release 2.13.0 (#405)
chore: drop mention of Python 2.7 from templates (#405)
Use latest version of api-common-protos (#412)
fix: remove setup.cfg configuration for creating universal wheels (#405)
docs: clarify TODO for reenabling erroring on warnings (#405)
chore(deps): update dependency google-cloud-datastore to v2.13.0 (#405)
feat: Add support for python 3.11 (#405)
fix: enable self signed jwt for grpc (#405)
fix: use true `keys_only` query for `Query.count()` (#405)
chore: update docfx minimum Python version (#405)
.kokoro: parallelize tests across single build (#405)
chore(deps): update precommit hook pycqa/flake8 to v3.9.0 (#405)
build(deps): Bump django from 4.2.16 to 4.2.18 in /.kokoro (#405)