gcloud-aio-pubsub
Python Client for Google Cloud Pub/Sub
What it is and what it does
gcloud-aio-pubsub is a Python client for Google Cloud Pub/Sub that provides both asyncio and threadsafe interfaces for interacting with Google's managed messaging service. It wraps the Pub/Sub API to enable applications to publish messages to topics and subscribe to them, supporting modern async/await patterns as well as traditional synchronous code. The package depends on gcloud-aio-auth for credential handling and prometheus-client for metrics collection.
The library is designed as a shared codebase supporting both async (gcloud-aio-pubsub) and synchronous (gcloud-rest-pubsub) usage patterns. It targets developers building cloud-native applications on Google Cloud Platform who need flexible concurrency models—either async for high-throughput I/O-bound workloads or threadsafe patterns for traditional multi-threaded applications. The package has been in active development since 2017 and maintains production-stable status across Python 3.9 through 3.13.
Use it for:
- Publish events from an async web service to Pub/Sub topics for downstream processing.
- Subscribe to Pub/Sub messages in a background worker with asyncio concurrency.
- Integrate Pub/Sub messaging into a multi-threaded application using the synchronous variant.
- Monitor Pub/Sub client metrics via prometheus-client for observability.
- Build event-driven microservices on Google Cloud with async/await patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asyncio and threadsafe Python client for Google Cloud Pub/Sub, supporting both async and synchronous patterns for publishing and subscribing to cloud messaging topics.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It is production-stable and well-positioned for applications that need asyncio or threadsafe Pub/Sub access on Google Cloud. Install it if you are building on GCP and prefer async patterns or need an alternative to the official client library.
Install
gcloud-aio-pubsub on PyPI
pip
pip install gcloud-aio-pubsubuv
uv add gcloud-aio-pubsubpoetry
poetry add gcloud-aio-pubsubInstalling gcloud-aio-pubsub
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent commit on 2026-08-14 and stable production status. Depends on gcloud-aio-auth and prometheus-client, both common utilities.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.
Quickstart
pip install gcloud-aio-pubsub
from gcloud.aio.pubsub import Publisher
import asyncio
async def publish():
async with Publisher() as publisher:
await publisher.publish(topic='projects/my-project/topics/my-topic', message=b'hello')
Requires Python 3.9 or later; Google Cloud credentials must be configured in the environment.
Verify before relying
- Whether the package supports both gcloud-aio-pubsub (async) and gcloud-rest-pubsub (sync) variants from a single installation.
- Performance characteristics and throughput limits compared to the official google-cloud-pubsub library.
- Whether prometheus-client integration is automatic or requires explicit configuration.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — gcloud-aio-auth, prometheus-client |
| Maintenance | actively maintained — 393 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 727,308/month — #5,217 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gcloud_aio_pubsub-6.3.0-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
gcloud-aio-datastoreAsyncio and threadsafe Python client for Google…
permissive · top 15,000 on PyPI
nats-pyAn asyncio Python client for connecting to and…
permissive · top 5,000 on PyPI
telegraphTelegraph is a Python wrapper for the Telegraph…
permissive · top 15,000 on PyPI
solace-pubsubplusSolace Messaging API for Python provides client…
permissive · top 15,000 on PyPI
gcloud-aio-taskqueueAsyncio and threadsafe Python client library…
permissive · top 15,000 on PyPI
gcloud-aio-storageProvides an asyncio-based Python client for…
permissive · top 1,000 on PyPI
google-cloud-pubsubPython client library for Google Cloud Pub/Sub,…
permissive · top 1,000 on PyPI
pubcontrolPublishes messages to multiple endpoints via…
permissive · top 15,000 on PyPI
gcloud-aio-authProvides asyncio-compatible and threadsafe…
permissive · top 1,000 on PyPI
broadcasterBroadcaster provides a simple async broadcast…
permissive · top 15,000 on PyPI