Reputation: 402
I need to query a kind K in my project P in python where the kinds can be seen on https://ah-builtin-python-bundle-dot-P.appspot.com/
from google.cloud import datastore
client = datastore.client.Client(project='P')
query = client.query(kind='K')
print list(query.fetch(1))
running this does not return anything, it just gets stuck on the last line
Upvotes: 0
Views: 81
Reputation: 2184
You should be creating your client with
client = datastore.Client(project = "myProjectName")
And not
client = datastore.client.Client(project = "myProjectName")
Upvotes: 1