Content-Length: 845555 | pFad | http://github.com/googleapis/google-cloud-python/commit/b97b8e85ff0c81190beb02eb226ca522803e5a3e

05 Prep spanner docs for repo split. (#5938) · googleapis/google-cloud-python@b97b8e8 · GitHub
Skip to content

Commit b97b8e8

Browse files
authored
Prep spanner docs for repo split. (#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 #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.

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.

docs/spanner/usage.rst renamed to spanner/docs/client-usage.rst

Lines changed: 11 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,3 @@
1-
Spanner
2-
^^^^^^^
3-
4-
`Cloud Spanner`_ is the world's first fully managed relational database service
5-
to offer both strong consistency and horizontal scalability for
6-
mission-critical online transaction processing (OLTP) applications. With Cloud
7-
Spanner you enjoy all the traditional benefits of a relational database; but
8-
unlike any other relational database service, Cloud Spanner scales horizontally
9-
to hundreds or thousands of servers to handle the biggest transactional
10-
workloads.
11-
12-
.. _Cloud Spanner: https://cloud.google.com/spanner/
13-
14-
.. toctree::
15-
:maxdepth: 1
16-
:titlesonly:
17-
:hidden:
18-
19-
instance-usage
20-
database-usage
21-
batch-usage
22-
snapshot-usage
23-
transaction-usage
24-
advanced-session-pool-topics
25-
api-reference
26-
27-
Installation
28-
============
29-
30-
Install the ``google-cloud-spanner`` library using ``pip``:
31-
32-
.. code-block:: console
33-
34-
$ pip install google-cloud-spanner
35-
361
Spanner Client
372
==============
383

@@ -95,13 +60,18 @@ Configuration
9560

9661
Be sure to use the **Project ID**, not the **Project Number**.
9762

63+
9864
Warnings about Multiprocessing
99-
-------------------------------------------------
100-
- When using multiprocessing, the application may hang if a
101-
:class:`Client <google.cloud.spanner_v1.client.Client>` instance is created before
102-
:class:`multiprocessing.Pool` or :class:`multiprocessing.Process` invokes :func:`os.fork`.
103-
The issue is under investigation, but may be only happening on Macintosh and not Linux.
104-
See `GRPC/GRPC#12455 <https://github.com/grpc/grpc/issues/12455#issuecomment-348578950>`_ for more information.
65+
------------------------------
66+
67+
.. warning::
68+
When using multiprocessing, the application may hang if a
69+
:class:`Client <google.cloud.spanner_v1.client.Client>` instance is created
70+
before :class:`multiprocessing.Pool` or :class:`multiprocessing.Process`
71+
invokes :func:`os.fork`. The issue is under investigation, but may be only
72+
happening on Macintosh and not Linux. See `GRPC/GRPC#12455
73+
<https://github.com/grpc/grpc/issues/12455#issuecomment-348578950>`_ for
74+
more information.
10575

10676
Next Step
10777
---------
@@ -114,13 +84,3 @@ Next, learn about the :doc:`instance-usage`.
11484

11585
.. _Instance Admin: https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.instance.v1
11686
.. _Database Admin: https://cloud.google.com/spanner/reference/rpc/google.spanner.admin.database.v1
117-
118-
Changelog
119-
=========
120-
121-
For a list of all ``google-cloud-spanner`` releases:
122-
123-
.. toctree::
124-
:maxdepth: 2
125-
126-
changelog

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/google-cloud-python/commit/b97b8e85ff0c81190beb02eb226ca522803e5a3e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy