11Python Client for Google Cloud Storage
22======================================
33
4- Python idiomatic client for `Google Cloud Storage `_
5-
6- .. _Google Cloud Storage : https://cloud.google.com/storage/docs
7-
84|pypi | |versions |
95
10- - `Documentation `_
6+ `Google Cloud Storage `_ () allows you to store data on
7+ Google infrastructure with very high reliability, performance and
8+ availability, and can be used to distribute large data objects to users
9+ via direct download.
1110
12- .. _Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/storage/client.html
11+ - `Client Library Documentation `_
12+ - `Storage API docs `_
13+
14+ .. |pypi | image :: https://img.shields.io/pypi/v/google-cloud-storage.svg
15+ :target: https://pypi.org/project/google-cloud-storage
16+ .. |versions | image :: https://img.shields.io/pypi/pyversions/google-cloud-storage.svg
17+ :target: https://pypi.org/project/google-cloud-storage
18+ .. _Google Cloud Storage : https://cloud.google.com/storage/docs
19+ .. _Client Library Documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/storage/client.html
20+ .. _Storage API docs : https://cloud.google.com/storage/docs/json_api/v1
1321
1422Quick Start
1523-----------
1624
17- .. code-block :: console
25+ In order to use this library, you first need to go through the following steps:
1826
19- $ pip install --upgrade google-cloud-storage
27+ 1. `Select or create a Cloud Platform project. `_
28+ 2. `Enable billing for your project. `_
29+ 3. `Enable the Google Cloud Storage API. `_
30+ 4. `Setup Authentication. `_
2031
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.
32+ .. _Select or create a Cloud Platform project. : https://console.cloud.google.com/project
33+ .. _Enable billing for your project. : https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
34+ .. _Enable the Google Cloud Storage API. : https://cloud.google.com/storage
35+ .. _Setup Authentication. : https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
2436
25- .. _Python Development Environment Setup Guide : https://cloud.google.com/python/setup
37+ Installation
38+ ~~~~~~~~~~~~
2639
27- Authentication
28- --------------
40+ Install this library in a `virtualenv `_ using pip. `virtualenv `_ is a tool to
41+ create isolated Python environments. The basic problem it addresses is one of
42+ dependencies and versions, and indirectly permissions.
2943
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.
44+ With `virtualenv `_, it's possible to install this library without needing system
45+ install permissions, and without clashing with the installed system
46+ dependencies.
3447
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
48+ .. _`virtualenv` : https://virtualenv.pypa.io/en/latest/
3749
38- Using the API
39- -------------
4050
41- Google `Cloud Storage `_ (`Storage API docs `_) allows you to store data on
42- Google infrastructure with very high reliability, performance and
43- availability, and can be used to distribute large data objects to users
44- via direct download.
51+ Mac/Linux
52+ ^^^^^^^^^
4553
46- .. _Cloud Storage : https://cloud.google.com/storage/docs
47- .. _Storage API docs : https://cloud.google.com/storage/docs/json_api/v1
54+ .. code-block :: console
4855
49- See the ``google-cloud-python `` API `storage documentation `_ to learn how to
50- connect to Cloud Storage using this Client Library.
56+ pip install virtualenv
57+ virtualenv <your-env>
58+ source <your-env>/bin/activate
59+ <your-env>/bin/pip install google-cloud-storage
60+
61+
62+ Windows
63+ ^^^^^^^
64+
65+ .. code-block :: console
5166
52- .. _storage documentation : https://googlecloudplatform.github.io/google-cloud-python/latest/storage/client.html
67+ pip install virtualenv
68+ virtualenv <your-env>
69+ <your-env>\Scripts\activate
70+ <your-env>\Scripts\pip.exe install google-cloud-storage
71+
72+
73+ Example Usage
74+ ~~~~~~~~~~~~~
5375
5476You need to create a Google Cloud Storage bucket to use this client library.
5577Follow along with the `official Google Cloud Storage documentation `_ to learn
@@ -69,8 +91,3 @@ how to create a bucket.
6991 blob.upload_from_string(' New contents!' )
7092 blob2 = bucket.blob(' remote/path/storage.txt' )
7193 blob2.upload_from_filename(filename = ' /local/path.txt' )
72-
73- .. |pypi | image :: https://img.shields.io/pypi/v/google-cloud-storage.svg
74- :target: https://pypi.org/project/google-cloud-storage
75- .. |versions | image :: https://img.shields.io/pypi/pyversions/google-cloud-storage.svg
76- :target: https://pypi.org/project/google-cloud-storage
0 commit comments