Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b69fe81

Browse filesBrowse files
authored
Prep pubsub docs for repo split. (#6001)
- Move docs from 'docs/pubsub' into 'pubsub/docs' and leave symlink. - Harmonize / DRY 'pubsub/README.rst' and 'pubsub/docs/index.rst'. - Ensure that docs still build from top-level. Toward #5912.
1 parent 6fa8611 commit b69fe81
Copy full SHA for b69fe81

File tree

Expand file treeCollapse file tree

14 files changed

+86
-196
lines changed
Filter options
Expand file treeCollapse file tree

14 files changed

+86
-196
lines changed

‎docs/pubsub

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../pubsub/docs/

‎docs/pubsub/changelog.md

Copy file name to clipboardExpand all lines: docs/pubsub/changelog.md
-1Lines changed: 0 additions & 1 deletion
This file was deleted.

‎docs/pubsub/index.rst

Copy file name to clipboardExpand all lines: docs/pubsub/index.rst
-154Lines changed: 0 additions & 154 deletions
This file was deleted.

‎pubsub/README.rst

Copy file name to clipboardExpand all lines: pubsub/README.rst
+61-40Lines changed: 61 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,88 @@
11
Python Client for Google Cloud Pub / Sub
22
========================================
33

4-
Python idiomatic client for `Google Cloud Pub / Sub`_
4+
|pypi| |versions|
55

6-
.. _Google Cloud Pub / Sub: https://cloud.google.com/pubsub/docs
6+
`Google Cloud Pub / Sub`_ is a fully-managed real-time messaging service that
7+
allows you to send and receive messages between independent applications. You
8+
can leverage Cloud Pub/Sub’s flexibility to decouple systems and components
9+
hosted on Google Cloud Platform or elsewhere on the Internet. By building on
10+
the same technology Google uses, Cloud Pub / Sub is designed to provide “at
11+
least once” delivery at low latency with on-demand scalability to 1 million
12+
messages per second (and beyond).
713

8-
|pypi| |versions|
14+
Publisher applications can send messages to a ``topic`` and other applications
15+
can subscribe to that topic to receive the messages. By decoupling senders and
16+
receivers, Google Cloud Pub/Sub allows developers to communicate between
17+
independently written applications.
918

10-
- `Documentation`_
19+
- `Product Documentation`_
20+
- `Client Library Documentation`_
1121

12-
.. _Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/pubsub/
22+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-pubsub.svg
23+
:target: https://pypi.org/project/google-cloud-pubsub/
24+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-pubsub.svg
25+
:target: https://pypi.org/project/google-cloud-pubsub/
26+
.. _Google Cloud Pub / Sub: https://cloud.google.com/pubsub/
27+
.. _Product Documentation: https://cloud.google.com/pubsub/docs
28+
.. _Client Library Documentation: https://googlecloudplatform.github.io/google-cloud-python/latest/pubsub/
1329

1430
Quick Start
1531
-----------
1632

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

19-
$ pip install --upgrade google-cloud-pubsub
35+
1. `Select or create a Cloud Platform project.`_
36+
2. `Enable billing for your project.`_
37+
3. `Enable the Google Cloud Pub / Sub API.`_
38+
4. `Setup Authentication.`_
2039

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.
40+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
41+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
42+
.. _Enable the Google Cloud Pub / Sub API.: https://cloud.google.com/pubsub
43+
.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html
2444

25-
.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup
45+
Installation
46+
~~~~~~~~~~~~
2647

27-
Authentication
28-
--------------
48+
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
49+
create isolated Python environments. The basic problem it addresses is one of
50+
dependencies and versions, and indirectly permissions.
2951

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.
52+
With `virtualenv`_, it's possible to install this library without needing system
53+
install permissions, and without clashing with the installed system
54+
dependencies.
3455

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
56+
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
3757

38-
Using the API
39-
-------------
4058

41-
Google `Cloud Pub/Sub`_ (`Pub/Sub API docs`_) is designed to provide reliable,
42-
many-to-many, asynchronous messaging between applications. Publisher
43-
applications can send messages to a ``topic`` and other applications can
44-
subscribe to that topic to receive the messages. By decoupling senders and
45-
receivers, Google Cloud Pub/Sub allows developers to communicate between
46-
independently written applications.
59+
Mac/Linux
60+
^^^^^^^^^
61+
62+
.. code-block:: console
63+
64+
pip install virtualenv
65+
virtualenv <your-env>
66+
source <your-env>/bin/activate
67+
<your-env>/bin/pip install google-cloud-pubsub
68+
4769
48-
.. _Cloud Pub/Sub: https://cloud.google.com/pubsub/docs
49-
.. _Pub/Sub API docs: https://cloud.google.com/pubsub/docs/reference/rest/
70+
Windows
71+
^^^^^^^
5072

51-
See the ``google-cloud-python`` API `Pub/Sub documentation`_ to learn how to connect
52-
to Cloud Pub/Sub using this Client Library.
73+
.. code-block:: console
74+
75+
pip install virtualenv
76+
virtualenv <your-env>
77+
<your-env>\Scripts\activate
78+
<your-env>\Scripts\pip.exe install google-cloud-pubsub
5379
54-
.. _Pub/Sub documentation: http://google-cloud-python.readthedocs.io/en/latest/pubsub/index.html
5580
81+
Example Usage
82+
~~~~~~~~~~~~~
5683

5784
Publishing
58-
----------
85+
^^^^^^^^^^
5986

6087
To publish data to Cloud Pub/Sub you must create a topic, and then publish
6188
messages to it
@@ -79,7 +106,7 @@ To learn more, consult the `publishing documentation`_.
79106

80107

81108
Subscribing
82-
-----------
109+
^^^^^^^^^^^
83110

84111
To subscribe to data in Cloud Pub/Sub, you create a subscription based on
85112
the topic, and subscribe to that.
@@ -115,9 +142,3 @@ use of a callback.
115142
To learn more, consult the `subscriber documentation`_.
116143

117144
.. _subscriber documentation: http://google-cloud-python.readthedocs.io/en/latest/pubsub/subscriber/index.html
118-
119-
120-
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-pubsub.svg
121-
:target: https://pypi.org/project/google-cloud-pubsub/
122-
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-pubsub.svg
123-
:target: https://pypi.org/project/google-cloud-pubsub/

‎pubsub/docs/changelog.md

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

‎pubsub/docs/index.rst

Copy file name to clipboard
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. include:: /../pubsub/README.rst
2+
3+
API Documentation
4+
-----------------
5+
6+
.. toctree::
7+
:maxdepth: 3
8+
9+
publisher/index
10+
subscriber/index
11+
types
12+
13+
Changelog
14+
---------
15+
16+
For a list of all ``google-cloud-pubsub`` releases:
17+
18+
.. toctree::
19+
:maxdepth: 2
20+
21+
changelog
22+
File renamed without changes.

‎docs/pubsub/subscriber/index.rst renamed to ‎pubsub/docs/subscriber/index.rst

Copy file name to clipboardExpand all lines: pubsub/docs/subscriber/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ each message received.
6161
callback
6262
)
6363
64-
This will return a
64+
This will return a
6565
:class:`~.pubsub_v1.subscriber.futures.StreamingPullFuture`. This future allows
6666
you to control the background thread that is managing the subscription.
6767

File renamed without changes.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.