3
3
Google Cloud Pub/Sub Python Samples
4
4
===============================================================================
5
5
6
+ .. image :: https://gstatic.com/cloudssh/images/open-btn.png
7
+ :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
8
+
9
+
6
10
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.
7
11
8
12
@@ -54,6 +58,10 @@ Samples
54
58
Quickstart
55
59
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
56
60
61
+ .. image :: https://gstatic.com/cloudssh/images/open-btn.png
62
+ :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/quickstart.py;pubsub/cloud-client/README.rst
63
+
64
+
57
65
58
66
59
67
To run this sample:
@@ -66,6 +74,10 @@ To run this sample:
66
74
Publisher
67
75
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
68
76
77
+ .. image :: https://gstatic.com/cloudssh/images/open-btn.png
78
+ :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
79
+
80
+
69
81
70
82
71
83
To run this sample:
@@ -78,13 +90,13 @@ To run this sample:
78
90
project
79
91
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
80
92
...
81
-
93
+
82
94
This application demonstrates how to perform basic operations on topics
83
95
with the Cloud Pub/Sub API.
84
-
96
+
85
97
For more information, see the README.md under /pubsub and the documentation
86
98
at https://cloud.google.com/pubsub/docs.
87
-
99
+
88
100
positional arguments:
89
101
project Your Google Cloud project ID
90
102
{list,create,delete,publish,publish-with-futures,publish-with-batch-settings}
@@ -98,14 +110,19 @@ To run this sample:
98
110
publish-with-batch-settings
99
111
Publishes multiple messages to a Pub/Sub topic with
100
112
batch settings.
101
-
113
+
102
114
optional arguments:
103
115
-h, --help show this help message and exit
104
116
105
117
118
+
106
119
Subscribers
107
120
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
108
121
122
+ .. image :: https://gstatic.com/cloudssh/images/open-btn.png
123
+ :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
124
+
125
+
109
126
110
127
111
128
To run this sample:
@@ -115,33 +132,40 @@ To run this sample:
115
132
$ python subscriber.py
116
133
117
134
usage: subscriber.py [-h]
118
- project {list,create,delete,receive,receive-flow-control}
135
+ project
136
+ {list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
119
137
...
120
-
138
+
121
139
This application demonstrates how to perform basic operations on
122
140
subscriptions with the Cloud Pub/Sub API.
123
-
141
+
124
142
For more information, see the README.md under /pubsub and the documentation
125
143
at https://cloud.google.com/pubsub/docs.
126
-
144
+
127
145
positional arguments:
128
146
project Your Google Cloud project ID
129
- {list,create,delete,receive,receive-flow-control}
130
- list Lists all subscriptions for a given topic.
147
+ {list_in_topic,list_in_project,create,delete,receive,receive-flow-control}
148
+ list_in_topic Lists all subscriptions for a given topic.
149
+ list_in_project Lists all subscriptions in the current project.
131
150
create Create a new pull subscription on the given topic.
132
151
delete Deletes an existing Pub/Sub topic.
133
152
receive Receives messages from a pull subscription.
134
153
receive-flow-control
135
154
Receives messages from a pull subscription with flow
136
155
control.
137
-
156
+
138
157
optional arguments:
139
158
-h, --help show this help message and exit
140
159
141
160
161
+
142
162
Identity and Access Management
143
163
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
144
164
165
+ .. image :: https://gstatic.com/cloudssh/images/open-btn.png
166
+ :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
167
+
168
+
145
169
146
170
147
171
To run this sample:
@@ -154,13 +178,13 @@ To run this sample:
154
178
project
155
179
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions}
156
180
...
157
-
181
+
158
182
This application demonstrates how to perform basic operations on IAM
159
183
policies with the Cloud Pub/Sub API.
160
-
184
+
161
185
For more information, see the README.md under /pubsub and the documentation
162
186
at https://cloud.google.com/pubsub/docs.
163
-
187
+
164
188
positional arguments:
165
189
project Your Google Cloud project ID
166
190
{get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions}
@@ -176,13 +200,14 @@ To run this sample:
176
200
check-subscription-permissions
177
201
Checks to which permissions are available on the given
178
202
subscription.
179
-
203
+
180
204
optional arguments:
181
205
-h, --help show this help message and exit
182
206
183
207
184
208
185
209
210
+
186
211
The client library
187
212
-------------------------------------------------------------------------------
188
213
0 commit comments