-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove PubSub cloud-client samples (#4175)
* chore: remove PubSub cloud-client samples * chore: add link to new samples location in README Co-authored-by: Tianzi Cai <anguillanneuf@gmail.com>
- Loading branch information
1 parent
1b44894
commit 5aa21ca
Showing
14 changed files
with
2 additions
and
2,539 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,240 +1,3 @@ | ||
.. This file is automatically generated. Do not edit this file directly. | ||
These samples have been moved. | ||
|
||
Google Cloud Pub/Sub Python Samples | ||
=============================================================================== | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/README.rst | ||
|
||
|
||
This directory contains samples for Google Cloud Pub/Sub. `Google Cloud Pub/Sub`_ is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. | ||
|
||
|
||
|
||
|
||
.. _Google Cloud Pub/Sub: https://cloud.google.com/pubsub/docs | ||
|
||
Setup | ||
------------------------------------------------------------------------------- | ||
|
||
|
||
Authentication | ||
++++++++++++++ | ||
|
||
This sample requires you to have authentication setup. Refer to the | ||
`Authentication Getting Started Guide`_ for instructions on setting up | ||
credentials for applications. | ||
|
||
.. _Authentication Getting Started Guide: | ||
https://cloud.google.com/docs/authentication/getting-started | ||
|
||
Install Dependencies | ||
++++++++++++++++++++ | ||
|
||
#. Clone python-docs-samples and change directory to the sample directory you want to use. | ||
|
||
.. code-block:: bash | ||
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git | ||
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. | ||
|
||
.. _Python Development Environment Setup Guide: | ||
https://cloud.google.com/python/setup | ||
|
||
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. | ||
|
||
.. code-block:: bash | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
#. Install the dependencies needed to run the samples. | ||
|
||
.. code-block:: bash | ||
$ pip install -r requirements.txt | ||
.. _pip: https://pip.pypa.io/ | ||
.. _virtualenv: https://virtualenv.pypa.io/ | ||
|
||
Samples | ||
------------------------------------------------------------------------------- | ||
|
||
Publisher | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/publisher.py,pubsub/cloud-client/README.rst | ||
|
||
|
||
|
||
|
||
To run this sample: | ||
|
||
.. code-block:: bash | ||
$ python publisher.py --help | ||
usage: publisher.py [-h] | ||
project_id | ||
{list,create,delete,publish,publish-with-custom-attributes,publish-with-error-handler,publish-with-batch-settings,publish-with-retry-settings} | ||
... | ||
This application demonstrates how to perform basic operations on topics | ||
with the Cloud Pub/Sub API. | ||
For more information, see the README.md under /pubsub and the documentation | ||
at https://cloud.google.com/pubsub/docs. | ||
positional arguments: | ||
project_id Your Google Cloud project ID | ||
{list,create,delete,publish,publish-with-custom-attributes,publish-with-error-handler,publish-with-batch-settings,publish-with-retry-settings} | ||
list Lists all Pub/Sub topics in the given project. | ||
create Create a new Pub/Sub topic. | ||
delete Deletes an existing Pub/Sub topic. | ||
publish Publishes multiple messages to a Pub/Sub topic. | ||
publish-with-custom-attributes | ||
Publishes multiple messages with custom attributes to | ||
a Pub/Sub topic. | ||
publish-with-error-handler | ||
Publishes multiple messages to a Pub/Sub topic with an | ||
error handler. | ||
publish-with-batch-settings | ||
Publishes multiple messages to a Pub/Sub topic with | ||
batch settings. | ||
publish-with-retry-settings | ||
Publishes messages with custom retry settings. | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
Subscribers | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/subscriber.py,pubsub/cloud-client/README.rst | ||
|
||
|
||
|
||
|
||
To run this sample: | ||
|
||
.. code-block:: bash | ||
$ python subscriber.py --help | ||
usage: subscriber.py [-h] | ||
project_id | ||
{list-in-topic,list-in-project,create,create-with-dead-letter-policy,create-push,delete,update-push,update-dead-letter-policy,remove-dead-letter-policy,receive,receive-custom-attributes,receive-flow-control,receive-synchronously,receive-synchronously-with-lease,listen-for-errors,receive-messages-with-delivery-attempts} | ||
... | ||
This application demonstrates how to perform basic operations on | ||
subscriptions with the Cloud Pub/Sub API. | ||
For more information, see the README.md under /pubsub and the documentation | ||
at https://cloud.google.com/pubsub/docs. | ||
positional arguments: | ||
project_id Your Google Cloud project ID | ||
{list-in-topic,list-in-project,create,create-with-dead-letter-policy,create-push,delete,update-push,update-dead-letter-policy,remove-dead-letter-policy,receive,receive-custom-attributes,receive-flow-control,receive-synchronously,receive-synchronously-with-lease,listen-for-errors,receive-messages-with-delivery-attempts} | ||
list-in-topic Lists all subscriptions for a given topic. | ||
list-in-project Lists all subscriptions in the current project. | ||
create Create a new pull subscription on the given topic. | ||
create-with-dead-letter-policy | ||
Create a subscription with dead letter policy. | ||
create-push Create a new push subscription on the given topic. | ||
delete Deletes an existing Pub/Sub topic. | ||
update-push Updates an existing Pub/Sub subscription's push | ||
endpoint URL. Note that certain properties of a | ||
subscription, such as its topic, are not modifiable. | ||
update-dead-letter-policy | ||
Update a subscription's dead letter policy. | ||
remove-dead-letter-policy | ||
Remove dead letter policy from a subscription. | ||
receive Receives messages from a pull subscription. | ||
receive-custom-attributes | ||
Receives messages from a pull subscription. | ||
receive-flow-control | ||
Receives messages from a pull subscription with flow | ||
control. | ||
receive-synchronously | ||
Pulling messages synchronously. | ||
receive-synchronously-with-lease | ||
Pulling messages synchronously with lease management | ||
listen-for-errors Receives messages and catches errors from a pull | ||
subscription. | ||
receive-messages-with-delivery-attempts | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
Identity and Access Management | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/iam.py,pubsub/cloud-client/README.rst | ||
|
||
|
||
|
||
|
||
To run this sample: | ||
|
||
.. code-block:: bash | ||
$ python iam.py | ||
usage: iam.py [-h] | ||
project | ||
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions} | ||
... | ||
This application demonstrates how to perform basic operations on IAM | ||
policies with the Cloud Pub/Sub API. | ||
For more information, see the README.md under /pubsub and the documentation | ||
at https://cloud.google.com/pubsub/docs. | ||
positional arguments: | ||
project Your Google Cloud project ID | ||
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions} | ||
get-topic-policy Prints the IAM policy for the given topic. | ||
get-subscription-policy | ||
Prints the IAM policy for the given subscription. | ||
set-topic-policy Sets the IAM policy for a topic. | ||
set-subscription-policy | ||
Sets the IAM policy for a topic. | ||
check-topic-permissions | ||
Checks to which permissions are available on the given | ||
topic. | ||
check-subscription-permissions | ||
Checks to which permissions are available on the given | ||
subscription. | ||
optional arguments: | ||
-h, --help show this help message and exit | ||
The client library | ||
------------------------------------------------------------------------------- | ||
|
||
This sample uses the `Google Cloud Client Library for Python`_. | ||
You can read the documentation for more details on API usage and use GitHub | ||
to `browse the source`_ and `report issues`_. | ||
|
||
.. _Google Cloud Client Library for Python: | ||
https://googlecloudplatform.github.io/google-cloud-python/ | ||
.. _browse the source: | ||
https://github.com/GoogleCloudPlatform/google-cloud-python | ||
.. _report issues: | ||
https://github.com/GoogleCloudPlatform/google-cloud-python/issues | ||
|
||
|
||
.. _Google Cloud SDK: https://cloud.google.com/sdk/ | ||
https://github.com/googleapis/python-pubsub/tree/master/samples |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.