Skip to content

Commit b97b8e8

Browse files
authored
Prep spanner docs for repo split. (googleapis#5938)
- Move docs from 'docs/spanner' into 'spanner/docs' and leave symlink. - Harmonize / DRY 'spanner/README.rst' and 'spanner/docs/index.rst'. - Ensure that docs still build from top-level. Toward googleapis#5912.
1 parent 7a7a83d commit b97b8e8

31 files changed

+427
-93
lines changed

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
oslogin/index
2323
resource-manager/api
2424
runtimeconfig/usage
25-
spanner/usage
25+
spanner/index
2626
speech/index
2727
error-reporting/usage
2828
monitoring/index

docs/spanner

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

docs/spanner/changelog.md

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

spanner/README.rst

Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,82 @@
11
Python Client for Cloud Spanner
22
===============================
33

4-
Python idiomatic client for `Cloud Spanner`_.
4+
|pypi| |versions|
55

6-
.. _Cloud Spanner: https://cloud.google.com/spanner/
6+
`Cloud Spanner`_ is the world's first fully managed relational database service
7+
to offer both strong consistency and horizontal scalability for
8+
mission-critical online transaction processing (OLTP) applications. With Cloud
9+
Spanner you enjoy all the traditional benefits of a relational database; but
10+
unlike any other relational database service, Cloud Spanner scales horizontally
11+
to hundreds or thousands of servers to handle the biggest transactional
12+
workloads.
713

8-
|pypi| |versions|
914

10-
- `Documentation`_
15+
- `Client Library Documentation`_
16+
- `Product Documentation`_
1117

12-
.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/spanner/usage.html
18+
19+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-spanner.svg
20+
:target: https://pypi.org/project/google-cloud-spanner/
21+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-spanner.svg
22+
:target: https://pypi.org/project/google-cloud-spanner/
23+
.. _Cloud Spanner: https://cloud.google.com/spanner/
24+
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/spanner/index.html
25+
.. _Product Documentation: https://cloud.google.com/spanner/docs
1326

1427
Quick Start
1528
-----------
1629

17-
.. code-block:: console
30+
In order to use this library, you first need to go through the following steps:
1831

19-
$ pip install --upgrade google-cloud-spanner
32+
1. `Select or create a Cloud Platform project.`_
33+
2. `Enable billing for your project.`_
34+
3. `Enable the Google Cloud Datastore API.`_
35+
4. `Setup Authentication.`_
2036

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.
37+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
38+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
39+
.. _Enable the Google Cloud Datastore API.: https://cloud.google.com/datastore
40+
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
2441

25-
.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup
42+
Installation
43+
~~~~~~~~~~~~
2644

45+
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
46+
create isolated Python environments. The basic problem it addresses is one of
47+
dependencies and versions, and indirectly permissions.
2748

28-
Authentication
29-
--------------
49+
With `virtualenv`_, it's possible to install this library without needing system
50+
install permissions, and without clashing with the installed system
51+
dependencies.
3052

31-
With ``google-cloud-python`` we try to make authentication as painless as
32-
possible. Check out the `Authentication section`_ in our documentation to
33-
learn more. You may also find the `authentication document`_ shared by all
34-
the ``google-cloud-*`` libraries to be helpful.
53+
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
3554

36-
.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html
37-
.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication
3855

56+
Mac/Linux
57+
^^^^^^^^^
3958

40-
Using the API
41-
-------------
59+
.. code-block:: console
4260
43-
Cloud Spanner is the world’s first fully managed relational database service
44-
to offer both strong consistency and horizontal scalability for
45-
mission-critical online transaction processing (OLTP) applications. With Cloud
46-
Spanner you enjoy all the traditional benefits of a relational database; but
47-
unlike any other relational database service, Cloud Spanner scales
48-
horizontally to hundreds or thousands of servers to handle the biggest
49-
transactional workloads. (`About Cloud Spanner`_)
61+
pip install virtualenv
62+
virtualenv <your-env>
63+
source <your-env>/bin/activate
64+
<your-env>/bin/pip install google-cloud-datastore
65+
66+
67+
Windows
68+
^^^^^^^
5069

51-
.. _About Cloud Spanner: https://cloud.google.com/spanner/
70+
.. code-block:: console
71+
72+
pip install virtualenv
73+
virtualenv <your-env>
74+
<your-env>\Scripts\activate
75+
<your-env>\Scripts\pip.exe install google-cloud-datastore
76+
77+
78+
Example Usage
79+
-------------
5280

5381

5482
Executing Arbitrary SQL in a Transaction
@@ -152,15 +180,10 @@ if any of the records does not already exist.
152180
)
153181
154182
155-
Learn More
156-
----------
157-
158-
See the ``google-cloud-python`` API `Cloud Spanner documentation`_ to learn how
159-
to connect to Cloud Spanner using this Client Library.
183+
Next Steps
184+
~~~~~~~~~~
160185

161-
.. _Cloud Spanner documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/spanner/usage.html
162-
163-
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-spanner.svg
164-
:target: https://pypi.org/project/google-cloud-spanner/
165-
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-spanner.svg
166-
:target: https://pypi.org/project/google-cloud-spanner/
186+
- See the `Client Library Documentation`_ to learn how to connect to Cloud
187+
Spanner using this Client Library.
188+
- Read the `Product documentation`_ to learn
189+
more about the product and see How-to Guides.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

spanner/docs/changelog.md

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

0 commit comments

Comments
 (0)