11Google Cloud Python Client
22==========================
33
4- Python idiomatic client for Google Cloud Platform services.
4+ Python idiomatic client for Google Cloud Platform services.
55
6- |build | |coverage | |pypi |
7- -------------------------
8-
9- - `Homepage `_
6+ |build | |coverage |
7+ ------------------
108
11- .. _ Homepage : https://googlecloudplatform.github.io/gcloud-python/
9+ - ` Homepage < https://googlecloudplatform.github.io/gcloud-python/ >`__
1210
1311This client supports the following Google Cloud Platform services:
1412
15- - `Google Cloud Datastore `_
16- - `Google Cloud Storage `_
17-
18- .. _Google Cloud Datastore : https://cloud.google.com/products/cloud-datastore/
19- .. _Google Cloud Storage : https://cloud.google.com/products/cloud-storage/
13+ - `Google Cloud
14+ Datastore <https://cloud.google.com/products/cloud-datastore/> `__
15+ - `Google Cloud
16+ Storage <https://cloud.google.com/products/cloud-storage/> `__
2017
21- If you need support for other Google APIs, check out the
22- `Google APIs Python Client library `_.
23-
24- .. _Google APIs Python Client library : https://github.com/google/google-api-python-client
25-
26- Versioning
27- ----------
28-
29- This library follows `Semantic Versioning `_.
30-
31- .. _Semantic Versioning : http://semver.org/
32-
33- It is currently in major version zero (``0.y.z ``), which means that anything
34- may change at any time and the public API should not be considered
35- stable.
18+ If you need support for other Google APIs, check out the `Google APIs
19+ Python Client
20+ library <https://github.com/google/google-api-python-client> `__.
3621
3722Quickstart
3823----------
@@ -44,60 +29,55 @@ Quickstart
4429Google Cloud Datastore
4530----------------------
4631
47- Google `Cloud Datastore `_ is a fully managed, schemaless database for
48- storing non-relational data. Cloud Datastore automatically scales with
49- your users and supports ACID transactions, high availability of reads and
50- writes, strong consistency for reads and ancestor queries, and eventual
51- consistency for all other queries.
52-
53- .. _Cloud Datastore : https://developers.google.com/datastore/
54-
55- See the `Google Cloud Datastore docs `_ for more details on how to activate
56- Cloud Datastore for your project.
32+ `Google Cloud Datastore <https://developers.google.com/datastore/ >`__ is
33+ a fully managed, schemaless database for storing non-relational data.
34+ Cloud Datastore automatically scales with your users and supports ACID
35+ transactions, high availability of reads and writes, strong consistency
36+ for reads and ancestor queries, and eventual consistency for all other
37+ queries.
5738
58- .. _Google Cloud Datastore docs : https://developers.google.com/datastore/docs/activate
39+ See the `Google Cloud Datastore
40+ docs <https://developers.google.com/datastore/docs/activate> `__ for more
41+ details on how to activate Cloud Datastore for your project.
5942
60- See the `` gcloud-python `` API ` datastore documentation `_ to learn how to interact
61- with the Cloud Datastore using this Client Library.
62-
63- .. _ datastore documentation : https://googlecloudplatform.github.io/gcloud-python/datastore-api.html
43+ See ` the gcloud-python API
44+ documentation <https://googlecloudplatform.github.io/gcloud-python/datastore-api.html> `__
45+ to learn how to interact with the Cloud Datastore using this Client
46+ Library.
6447
6548.. code :: python
6649
6750 from gcloud import datastore
68- datastore.set_default_connection()
69- datastore.set_default_dataset_id()
51+ dataset = datastore.get_dataset(' dataset-id-here' ,
52+ ' long-email@googleapis.com' ,
53+ ' /path/to/private.key' )
7054 # Then do other things...
71- from gcloud.datastore.entity import Entity
72- from gcloud.datastore.key import Key
73- from gcloud.datastore.query import Query
74- query = Query(kind = ' EntityKind' )
75- entity = Entity(key = Key(' EntityKind' ))
55+ query = dataset.query().kind(' EntityKind' )
56+ entity = dataset.entity(' EntityKind' )
7657
7758 Google Cloud Storage
7859--------------------
7960
80- Google `Cloud Storage `_ allows you to store data on Google infrastructure with
81- very high reliability, performance and availability, and can be used to
82- distribute large data objects to users via direct download.
83-
84- .. _Cloud Storage : https://developers.google.com/storage/
61+ `Google Cloud Storage <https://developers.google.com/storage/ >`__ allows
62+ you to store data on Google infrastructure with very high reliability,
63+ performance and availability, and can be used to distribute large data
64+ objects to users via direct download.
8565
8666You need to create a Google Cloud Storage bucket to use this client
87- library. Follow the steps on the `Google Cloud Storage docs `_
67+ library. Follow the steps on the `Google Cloud Storage
68+ docs <https://developers.google.com/storage/docs/cloud-console#_creatingbuckets> `__
8869to learn how to create a bucket.
8970
90- .. _Google Cloud Storage docs : https://developers.google.com/storage/docs/cloud-console#_creatingbuckets
91-
92- See the ``gcloud-python `` API `storage documentation `_ to learn how to connect
93- to Cloud Storage using this Client Library.
94-
95- .. _storage documentation : https://googlecloudplatform.github.io/gcloud-python/storage-api.html
71+ See `the gcloud-python API
72+ documentation <https://googlecloudplatform.github.io/gcloud-python/storage-api.html> `__
73+ to learn how to connect to the Cloud Storage using this Client Library.
9674
9775.. code :: python
9876
9977 import gcloud.storage
100- bucket = gcloud.storage.get_bucket(' bucket-id-here' , ' project-id' )
78+ bucket = gcloud.storage.get_bucket(' bucket-id-here' ,
79+ ' long-email@googleapis.com' ,
80+ ' /path/to/private.key' )
10181 # Then do other things...
10282 key = bucket.get_key(' /remote/path/to/file.txt' )
10383 print key.get_contents_as_string()
@@ -109,60 +89,46 @@ Contributing
10989
11090Contributions to this library are always welcome and highly encouraged.
11191
112- See `CONTRIBUTING `_ for more information on how to get started.
113-
114- .. _CONTRIBUTING : https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/CONTRIBUTING.rst
92+ See `CONTRIBUTING <CONTRIBUTING.rst >`__ for more information on how to
93+ get started.
11594
11695Supported Python Versions
11796-------------------------
11897
11998We support:
12099
121- - `Python 2.6 `_
122- - `Python 2.7 `_
100+ - `Python 2.6 < https://docs.python.org/2.6/ >`__
101+ - `Python 2.7 < https://docs.python.org/2.7/ >`__
123102
124103We plan to support:
125104
126- - `Python 3.3 `_
127- - `Python 3.4 `_
105+ - `Python 3.3 < https://docs.python.org/3.3/ >`__
106+ - `Python 3.4 < https://docs.python.org/3.4/ >`__
128107
129- .. _Python 2.6 : https://docs.python.org/2.6/
130- .. _Python 2.7 : https://docs.python.org/2.7/
131- .. _Python 3.3 : https://docs.python.org/3.3/
132- .. _Python 3.4 : https://docs.python.org/3.4/
108+ Supported versions can be found in our ``tox.ini ``
109+ `config <https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/tox.ini >`__.
133110
134- Supported versions can be found in our ``tox.ini `` `config `_.
111+ We explicitly decided not to support
112+ `Python 2.5 <https://docs.python.org/2.5/ >`__ due to
113+ `decreased usage <https://caremad.io/2013/10/a-look-at-pypi-downloads/ >`__ and
114+ lack of continuous integration
115+ `support <http://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ >`__.
135116
136- .. _config : https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/tox.ini
137-
138- We explicitly decided not to support `Python 2.5 `_ due to `decreased usage `_
139- and lack of continuous integration `support `_.
140-
141- .. _Python 2.5 : https://docs.python.org/2.5/
142- .. _decreased usage : https://caremad.io/2013/10/a-look-at-pypi-downloads/
143- .. _support : http://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/
144-
145- We also explicitly decided to support Python 3 beginning with version
146- 3.3. Reasons for this include:
117+ We also explicitly decided to support Python 3 beginning with version 3.3.
118+ Reasons for this include:
147119
148120- Encouraging use of newest versions of Python 3
149- - Taking the lead of prominent open-source `projects `_
150- - `Unicode literal support `_ which allows for a cleaner codebase that
151- works in both Python 2 and Python 3
152-
153- .. _projects : http://flask.pocoo.org/docs/0.10/python3/
154- .. _Unicode literal support : https://www.python.org/dev/peps/pep-0414/
121+ - Taking the lead of prominent open-source
122+ `projects <http://flask.pocoo.org/docs/0.10/python3/ >`__
123+ - Unicode literal `support <https://www.python.org/dev/peps/pep-0414 >`__ which
124+ allows for a cleaner codebase that works in both Python 2 and Python 3.
155125
156126License
157127-------
158128
159- Apache 2.0 - See `LICENSE `_ for more information.
160-
161- .. _LICENSE : https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/LICENSE
129+ Apache 2.0 - See `LICENSE <LICENSE >`__ for more information.
162130
163131.. |build | image :: https://travis-ci.org/GoogleCloudPlatform/gcloud-python.svg?branch=master
164- :target: https://travis-ci.org/GoogleCloudPlatform/gcloud-python
132+ :target: https://travis-ci.org/GoogleCloudPlatform/gcloud-python
165133.. |coverage | image :: https://coveralls.io/repos/GoogleCloudPlatform/gcloud-python/badge.png?branch=master
166- :target: https://coveralls.io/r/GoogleCloudPlatform/gcloud-python?branch=master
167- .. |pypi | image :: https://img.shields.io/pypi/v/gcloud.svg
168- :target: https://pypi.python.org/pypi/gcloud
134+ :target: https://coveralls.io/r/GoogleCloudPlatform/gcloud-python?branch=master
0 commit comments