1- Full 'getting started' guide
2- ----------------------------
3-
4- Creating a project
5- ~~~~~~~~~~~~~~~~~~
1+ Getting started with Cloud Datastore
2+ ====================================
63
74.. note ::
8- If you don't have a Google account,
9- you should probably sign up for one now...
5+ If you just want to kick the tires,
6+ you might prefer :doc: `datastore-quickstart `.
7+
8+ Creating a project
9+ ------------------
1010
1111* **Create a project **
1212
@@ -37,7 +37,7 @@ Then click OK
3737(give it a second to create your project).
3838
3939Enable the Cloud Datastore API
40- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+ ------------------------------
4141
4242Now that you created a project,
4343you need to *turn on * the Cloud Datastore API.
@@ -54,7 +54,7 @@ which services you intend to use for this project.
5454 to turn it into an "On" button.
5555
5656Enable a "Service Account"
57- ~~~~~~~~~~~~~~~~~~~~~~~~~~
57+ --------------------------
5858
5959Now that you have a project
6060that has access to the Cloud Datastore API,
@@ -102,15 +102,16 @@ To create a Service Account:
102102OK. That's it!
103103Time to start doing things with your Cloud Datastore project.
104104
105- Add some data to your Datastore
106- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105+ Add some data to your dataset
106+ -----------------------------
107107
108108Open a Python console and...
109109
110- >>> import gclouddatastore
111- >>> dataset = gclouddatastore.get_dataset(' <your-project-id-here' ,
112- '<the e-mail address you copied here>',
113- '/path/to/<your project>.key')
110+ >>> from gcloud import datastore
111+ >>> dataset = datastore.get_dataset(
112+ >>> ' <your-project-id-here' ,
113+ >>> ' <the e-mail address you copied here>' ,
114+ >>> ' /path/to/<your project>.key' )
114115 >>> dataset.query().fetch()
115116 []
116117 >>> entity = dataset.entity(' Person' )
@@ -119,3 +120,10 @@ Open a Python console and...
119120 >>> entity.save()
120121 >>> dataset.query(' Person' ).fetch()
121122 [<Entity{...} {'name': 'Your name', 'age': 25}>]
123+
124+ And that's it!
125+ --------------
126+
127+ Next,
128+ take a look at the complete
129+ :doc: `datastore-api `.
0 commit comments