-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.
Description
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 ?
from gcloud import datastore
import os
import webapp2
# dataset = datastore.get_dataset(
# 'appid',
# '[email protected]',
# os.path.abspath("appid.p12"))
#
# entity = dataset.entity('People')
# entity['name'] = 'helloworld'
# entity['age'] = 25
# entity.save()
# print 'Hello, world!'
class MainPage(webapp2.RequestHandler):
def get(self):
dataset = datastore.get_dataset(
'appid',
'[email protected]',
os.path.abspath("appid.p12"))
entity = dataset.entity('People')
entity['name'] = 'helloworld'
entity['age'] = 25
entity.save()
self.response.out.write('Hello')
application = webapp2.WSGIApplication([
('/', MainPage)
], debug=True)
I don't seem to get this working. like https://cloud.google.com/appengine/docs/python/gettingstartedpython27/helloworld
If anyone has this working on appengine please share. Thanks
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.triage meI really want to be triaged.I really want to be triaged.