I am trying to connect to my Google Datastore instance but I can't find any sample code for how to initialize a connection!
Gcloud's main documentation immediately starts with how to assign an Entity or a Query but skips the crucial connection bit. The demo section seems specific to the demo in that it uses test environment variables which is quite confusing.
Most importantly, I am interested in what environment variables I need to define and if it is possible to define the service email and path to key from within the python program.
Highly appreciate it if anyone can provide a sample code of how to commit something to a datastore instance.
Thanks!
After looking around, I finally found the environment variables I need define.
To connect to your google datastore from within Python:
Google assumes you are using App Engine with Datastore that is why it is trickier to find these variables if you first introduction to Google Cloud is its Datastore service.