Skip to content

Commit 57d25c2

Browse files
authored
Prep storage docs for repo split. (#5923)
- Move docs from 'docs/storage' into 'storage/docs' and leave symlink. - Harmonize / DRY 'storage/README.rst' and 'storage/docs/index.rst'. - Ensure that docs still build from top-level. Toward #5912.
1 parent 7d59799 commit 57d25c2

File tree

14 files changed

+400
-75
lines changed

14 files changed

+400
-75
lines changed

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
monitoring/index
2929
logging/usage
3030
redis/index
31-
storage/client
31+
storage/index
3232
tasks/index
3333
texttospeech/index
3434
translate/usage

docs/storage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../storage/docs/

docs/storage/changelog.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/storage/client.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

storage/README.rst

Lines changed: 53 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,77 @@
11
Python 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

1422
Quick 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

5476
You need to create a Google Cloud Storage bucket to use this client library.
5577
Follow 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

storage/docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

0 commit comments

Comments
 (0)