diff --git a/docs/datastore-getting-started.rst b/docs/datastore-getting-started.rst index 487460966102..fd944ef80d7f 100644 --- a/docs/datastore-getting-started.rst +++ b/docs/datastore-getting-started.rst @@ -1,12 +1,12 @@ -Full 'getting started' guide ----------------------------- - -Creating a project -~~~~~~~~~~~~~~~~~~ +Getting started with Cloud Datastore +==================================== .. note:: - If you don't have a Google account, - you should probably sign up for one now... + If you just want to kick the tires, + you might prefer :doc:`datastore-quickstart`. + +Creating a project +------------------ * **Create a project** @@ -37,7 +37,7 @@ Then click OK (give it a second to create your project). Enable the Cloud Datastore API -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------ Now that you created a project, you need to *turn on* the Cloud Datastore API. @@ -54,7 +54,7 @@ which services you intend to use for this project. to turn it into an "On" button. Enable a "Service Account" -~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------- Now that you have a project that has access to the Cloud Datastore API, @@ -102,15 +102,16 @@ To create a Service Account: OK. That's it! Time to start doing things with your Cloud Datastore project. -Add some data to your Datastore -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Add some data to your dataset +----------------------------- Open a Python console and... - >>> import gclouddatastore - >>> dataset = gclouddatastore.get_dataset('', - '/path/to/.key') + >>> from gcloud import datastore + >>> dataset = datastore.get_dataset( + >>> '>> '', + >>> '/path/to/.key') >>> dataset.query().fetch() [] >>> entity = dataset.entity('Person') @@ -119,3 +120,10 @@ Open a Python console and... >>> entity.save() >>> dataset.query('Person').fetch() [] + +And that's it! +-------------- + +Next, +take a look at the complete +:doc:`datastore-api`. diff --git a/docs/datastore-quickstart.rst b/docs/datastore-quickstart.rst index c92170f0e669..6c889d71f9c4 100644 --- a/docs/datastore-quickstart.rst +++ b/docs/datastore-quickstart.rst @@ -1,11 +1,10 @@ -Get started in 10 seconds -------------------------- +Cloud Datastore in 10 seconds +============================= -.. warning:: - This will use a *shared* dataset, +.. note:: + This will use a **shared** dataset, which means any data you save will be available to anyone. - If you want to create your own dataset, follow the (pretty simple) @@ -13,7 +12,7 @@ Get started in 10 seconds :doc:`datastore-getting-started`. Install the library -~~~~~~~~~~~~~~~~~~~ +------------------- The source code for the library (and demo code) @@ -28,20 +27,24 @@ included in the package:: $ python -m gcloud.datastore.demo -Try it yourself -~~~~~~~~~~~~~~~ +And that's it! +You just read and wrote a bunch of data +to the Cloud Datastore. -Crack open a Python interactive shell:: +Try it yourself +--------------- - $ python # or ipython +You can interact with a demo dataset +in a Python interactive shell. -And play with the demo dataset:: +Start by importing the demo module +and instantiating the demo dataset:: >>> from gcloud.datastore import demo >>> dataset = demo.get_dataset() -But once you have the dataset, -you can manipulate data in the datastore:: +Once you have the dataset, +you can create entities and save them:: >>> dataset.query('MyExampleKind').fetch() [>> dataset.query('Person').fetch() [] -The ``get_dataset`` method is just a shortcut for:: +.. note:: + The ``get_dataset`` method is just a shortcut for:: >>> from gcloud import datastore >>> from gcloud.datastore import demo >>> dataset = datastore.get_dataset( - demo.DATASET_ID, demo.CLIENT_EMAIL, demo.PRIVATE_KEY_PATH) + >>> demo.DATASET_ID, demo.CLIENT_EMAIL, demo.PRIVATE_KEY_PATH) + +OK, that's it! +-------------- + +Next, +take a look at the :doc:`datastore-getting-started` +to see how to create your own project and dataset. + +And you can always check out +the :doc:`datastore-api`.