Skip to main content

Python Client for Google Cloud Pub/Sub

Project description

Python idiomatic client for Google Cloud Pub / Sub

pypi versions

Quick Start

$ pip install --upgrade google-cloud-pubsub

Authentication

With google-cloud-python we try to make authentication as painless as possible. Check out the Authentication section in our documentation to learn more. You may also find the authentication document shared by all the google-cloud-* libraries to be helpful.

Using the API

Google Cloud Pub/Sub (Pub/Sub API docs) is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a topic and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications.

See the google-cloud-python API Pub/Sub documentation to learn how to connect to Cloud Pub/Sub using this Client Library.

To get started with this API, you’ll need to create

from google.cloud import pubsub

client = pubsub.Client()
topic = client.topic('topic_name')
topic.create()

topic.publish('this is the message_payload',
              attr1='value1', attr2='value2')

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-cloud-pubsub-0.25.0.tar.gz (25.2 kB view hashes)

Uploaded Source

Built Distribution

google_cloud_pubsub-0.25.0-py2.py3-none-any.whl (33.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page