google-cloud-pubsub
Google Cloud Pub/Sub API client library
Decision gist · record as of 2026-08-14
Yes. google-cloud-pubsub is a stable, actively maintained, zero-vulnerability official client for a managed Google Cloud service. Install it if you need asynchronous pub-sub messaging on Google Cloud. The only prerequisite is having a Google Cloud project with Pub/Sub enabled and authentication configured—both are standard setup steps for any Google Cloud work.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Google Cloud project with Pub/Sub enabled, billing configured, and authentication credentials (service account or application default credentials) set up.
- Low friction: pure Python wheel, actively maintained with release 8 days old, 5371 repository stars, and no known vulnerabilities.
- Requires 9 runtime dependencies including google-auth, grpcio, and protobuf.
License · maintenance · safety
Apache-2.0 (permissive) — Apache 2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
last release 2026-08-06 (8 days) · last repo commit 2026-08-14 · 5,371 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 118,553,519 downloads/mo, #306 on PyPI
Alternatives
Verify before relying
pip install google-cloud-pubsub
from google.cloud import pubsub_v1
import os
publisher = pubsub_v1.PublisherClient()
topic_name = f'projects/{os.getenv("GOOGLE_CLOUD_PROJECT")}/topics/MY_TOPIC'
publisher.create_topic(name=topic_name)
future = publisher.publish(topic_name, b'My first message!')
future.result()- Performance characteristics under high message volume or latency requirements
- Exact behavior of backpressure and flow control mechanisms
- Overhead and performance impact of OpenTelemetry instrumentation
What it is and what it does
google-cloud-pubsub is the official Python client for Google Cloud Pub/Sub, a managed messaging service that decouples applications through asynchronous, many-to-many message delivery. It provides PublisherClient and SubscriberClient classes to send messages to topics and consume them from subscriptions, with support for both callback-based and synchronous pull patterns. The library handles authentication via google-auth, serialization via protobuf, and transport via gRPC, with built-in OpenTelemetry instrumentation for observability.
The package is production-stable (major version 1), actively maintained, and supports Python 3.10 through 3.14. It requires 9 runtime dependencies including google-api-core, grpcio, proto-plus, and opentelemetry libraries. Installation is straightforward via pip, though using it requires a Google Cloud project with Pub/Sub enabled and proper authentication credentials configured.
Use it for
- Decouple microservices by publishing events to topics and subscribing to them asynchronously across services
- Build event-driven workflows where one application publishes state changes and multiple consumers react independently
- Implement reliable message queuing for background job processing with automatic retry and acknowledgment handling
- Stream real-time data between applications with guaranteed delivery and ordering guarantees per subscription
- Scale applications horizontally by distributing message processing across multiple subscriber instances
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
google-cloud-pubsub is a stable, actively maintained, zero-vulnerability official client for a managed Google Cloud service. Install it if you need asynchronous pub-sub messaging on Google Cloud. The only prerequisite is having a Google Cloud project with Pub/Sub enabled and authentication configured—both are standard setup steps for any Google Cloud work.
Install
google-cloud-pubsub on PyPI
Before you install
Low friction: pure Python wheel, actively maintained with release 8 days old, 5371 repository stars, and no known vulnerabilities. Requires 9 runtime dependencies including google-auth, grpcio, and protobuf.
Requires Google Cloud project with Pub/Sub enabled, billing configured, and authentication credentials (service account or application default credentials) set up.
License in practice
Apache 2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
Quickstart
pip install google-cloud-pubsub
from google.cloud import pubsub_v1
import os
publisher = pubsub_v1.PublisherClient()
topic_name = f'projects/{os.getenv("GOOGLE_CLOUD_PROJECT")}/topics/MY_TOPIC'
publisher.create_topic(name=topic_name)
future = publisher.publish(topic_name, b'My first message!')
future.result()
Verify before relying
- Performance characteristics under high message volume or latency requirements
- Exact behavior of backpressure and flow control mechanisms
- Overhead and performance impact of OpenTelemetry instrumentation
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packagesgoogle-api-coregoogle-authgrpcioproto-plusprotobufgrpc-google-iam-v1grpcio-statusopentelemetry-apiopentelemetry-sdk |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 118,553,519 / month, #306 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet |
Evidence: google_cloud_pubsub-2.39.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “publish subscribe messaging google cloud”
- google-cloud-pubsubPython client library for Google Cloud Pub/Sub, enabling asynchronous…
- gcloud-aio-pubsubAsyncio and threadsafe Python client for Google Cloud Pub/Sub,…
- azure-servicebusAzure Service Bus client library for Python that enables sending and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also gcloud · google-cloud-pubsublite · ably · gcloud-aio-pubsub · nats-py · broadcaster · google-cloud-bigtable · telegraph · pubcontrol · google-cloud-tasks