See http://googlecloudplatform.github.io/gcloud-python/latest/datastore-queries.html#gcloud.datastore.query.Query.fetch
The snippet is
>>> from gcloud.datastore.query import Query
>>> query = Query('dataset-id', 'Person')
>>> query.add_filter('name', '=', 'Sally')
>>> list(query.fetch())
[<Entity object>, <Entity object>, ...]
>>> list(query.fetch(1))
[<Entity object>]
I'd expect it to be
>>> from gcloud import datastore
>>> query = datastore.Query('Person') # note no dataset id
>>> query.add_filter('name', '=', 'Sally')
>>> list(query.fetch())
[<Entity object>, <Entity object>, ...]
>>> list(query.fetch(1))
[<Entity object>]
and a separate example for a specific dataset
>>> from gcloud import datastore
>>> dataset = datastore.Dataset('dataset-id')
>>> query = dataset.Query('Person')
>>> query.add_filter('name', '=', 'Sally')
>>> list(query.fetch())
[<Entity object>, <Entity object>, ...]
>>> list(query.fetch(1))
[<Entity object>]
See http://googlecloudplatform.github.io/gcloud-python/latest/datastore-queries.html#gcloud.datastore.query.Query.fetch
The snippet is
I'd expect it to be
and a separate example for a specific dataset