diff --git a/gcloud/datastore/__init__.py b/gcloud/datastore/__init__.py index 3acb3e956bae..5033aec06b63 100644 --- a/gcloud/datastore/__init__.py +++ b/gcloud/datastore/__init__.py @@ -16,11 +16,12 @@ You'll typically use these to get started with the API: ->>> from gcloud import datastore ->>> dataset = datastore.get_dataset('dataset-id-here') ->>> # Then do other things... ->>> query = dataset.query().kind('EntityKind') ->>> entity = dataset.entity('EntityKind') +>>> from gcloud.datastore.entity import Entity +>>> from gcloud.datastore.key import Key +>>> from gcloud.datastore.query import Query +>>> key = Key('EntityKind', 1234) +>>> entity = Entity(key) +>>> query = Query('your-dataset-id', kind='EntityKind') The main concepts with this API are: diff --git a/gcloud/datastore/test___init__.py b/gcloud/datastore/test___init__.py index 4280134134d3..2146d8fdc2f9 100644 --- a/gcloud/datastore/test___init__.py +++ b/gcloud/datastore/test___init__.py @@ -40,11 +40,13 @@ class Test_set_default_dataset(unittest2.TestCase): def setUp(self): from gcloud.datastore import _implicit_environ self._replaced_dataset = _implicit_environ.DATASET - _implicit_environ.DATASET = None + self._replaced_dataset_id = _implicit_environ.DATASET_ID + _implicit_environ.DATASET = _implicit_environ.DATASET_ID = None def tearDown(self): from gcloud.datastore import _implicit_environ _implicit_environ.DATASET = self._replaced_dataset + _implicit_environ.DATASET_ID = self._replaced_dataset_id def _callFUT(self, dataset_id=None): from gcloud.datastore import set_default_dataset