11Python Client for Google Cloud Datastore
22========================================
33
4- Python idiomatic client for `Google Cloud Datastore `_
5-
6- .. _Google Cloud Datastore : https://cloud.google.com/datastore/docs
7-
84|pypi | |versions |
95
10- - `Documentation `_
6+ `Google Cloud Datastore API `_ is a fully managed, schemaless database for
7+ storing non-relational data. Cloud Datastore automatically scales with your
8+ users and supports ACID transactions, high availability of reads and writes,
9+ strong consistency for reads and ancestor queries, and eventual consistency for
10+ all other queries.
1111
12- .. _Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/datastore/client.html
12+ - `Client Library Documentation `_
13+ - `Product Documentation `_
14+
15+ .. |pypi | image :: https://img.shields.io/pypi/v/google-cloud-datastore.svg
16+ :target: https://pypi.org/project/google-cloud-datastore/
17+ .. |versions | image :: https://img.shields.io/pypi/pyversions/google-cloud-datastore.svg
18+ :target: https://pypi.org/project/google-cloud-datastore/
19+ .. _Google Cloud Datastore API : https://cloud.google.com/datastore/docs
20+ .. _Product Documentation : https://cloud.google.com/datastore/docs
21+ .. _Client Library Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/datastore/index.html
1322
1423Quick Start
1524-----------
1625
17- .. code-block :: console
26+ In order to use this library, you first need to go through the following steps:
27+
28+ 1. `Select or create a Cloud Platform project. `_
29+ 2. `Enable billing for your project. `_
30+ 3. `Enable the Google Cloud Datastore API. `_
31+ 4. `Setup Authentication. `_
1832
19- $ pip install --upgrade google-cloud-datastore
33+ .. _Select or create a Cloud Platform project. : https://console.cloud.google.com/project
34+ .. _Enable billing for your project. : https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
35+ .. _Enable the Google Cloud Datastore API. : https://cloud.google.com/datastore
36+ .. _Setup Authentication. : https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
2037
21- For more information on setting up your Python development environment,
22- such as installing ``pip `` and ``virtualenv `` on your system, please refer
23- to `Python Development Environment Setup Guide `_ for Google Cloud Platform.
38+ Installation
39+ ~~~~~~~~~~~~
2440
25- .. _Python Development Environment Setup Guide : https://cloud.google.com/python/setup
41+ Install this library in a `virtualenv `_ using pip. `virtualenv `_ is a tool to
42+ create isolated Python environments. The basic problem it addresses is one of
43+ dependencies and versions, and indirectly permissions.
2644
27- Authentication
28- --------------
45+ With `virtualenv `_, it's possible to install this library without needing system
46+ install permissions, and without clashing with the installed system
47+ dependencies.
2948
30- With ``google-cloud-python `` we try to make authentication as painless as
31- possible. Check out the `Authentication section `_ in our documentation to
32- learn more. You may also find the `authentication document `_ shared by all
33- the ``google-cloud-* `` libraries to be helpful.
49+ .. _`virtualenv` : https://virtualenv.pypa.io/en/latest/
3450
35- .. _Authentication section : https://google-cloud-python.readthedocs.io/en/latest/core/auth.html
36- .. _authentication document : https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication
3751
38- Using the API
39- -------------
52+ Mac/Linux
53+ ^^^^^^^^^
4054
41- Google `Cloud Datastore `_ (`Datastore API docs `_) is a fully managed,
42- schemaless database for storing non-relational data. Cloud Datastore
43- automatically scales with your users and supports ACID transactions, high
44- availability of reads and writes, strong consistency for reads and ancestor
45- queries, and eventual consistency for all other queries.
55+ .. code-block :: console
56+
57+ pip install virtualenv
58+ virtualenv <your-env>
59+ source <your-env>/bin/activate
60+ <your-env>/bin/pip install google-cloud-datastore
4661
47- .. _Cloud Datastore : https://cloud.google.com/datastore/docs
48- .. _Datastore API docs : https://cloud.google.com/datastore/docs/
4962
50- See the `` google-cloud-python `` API ` datastore documentation `_ to learn how to
51- interact with the Cloud Datastore using this Client Library.
63+ Windows
64+ ^^^^^^^
5265
53- .. _ datastore documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/datastore/client.html
66+ .. code-block :: console
5467
55- See the `official Google Cloud Datastore documentation `_ for more details on
56- how to activate Cloud Datastore for your project.
68+ pip install virtualenv
69+ virtualenv <your-env>
70+ <your-env>\Scripts\activate
71+ <your-env>\Scripts\pip.exe install google-cloud-datastore
5772
58- .. _official Google Cloud Datastore documentation : https://cloud.google.com/datastore/docs/activate
73+
74+ Example Usage
75+ ~~~~~~~~~~~~~
5976
6077.. code :: python
6178
@@ -72,9 +89,12 @@ how to activate Cloud Datastore for your project.
7289 client.put(entity)
7390 # Then get by key for this entity
7491 result = client.get(key)
75- print result
92+ print ( result)
7693
77- .. |pypi | image :: https://img.shields.io/pypi/v/google-cloud-datastore.svg
78- :target: https://pypi.org/project/google-cloud-datastore/
79- .. |versions | image :: https://img.shields.io/pypi/pyversions/google-cloud-datastore.svg
80- :target: https://pypi.org/project/google-cloud-datastore/
94+ Next Steps
95+ ~~~~~~~~~~
96+
97+ - Read the `Client Library Documentation `_ for Google Cloud Datastore API
98+ API to see other available methods on the client.
99+ - Read the `Product documentation `_ to learn
100+ more about the product and see How-to Guides.
0 commit comments