skillfed

gcloud-aio-pubsub

Python Client for Google Cloud Pub/Sub

gcloud-aio-pubsub v6.3.0 727.3K downloads/30d#5,217 on PyPI348
Permissive license MIT Active released

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-pubsub

uv

uv add gcloud-aio-pubsub

poetry

poetry add gcloud-aio-pubsub

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet

Tags

google cloud pubsub python clientasyncio pubsub messaginggcp pub/sub asynccloud messaging pythonthreadsafe pubsub clientgoogle cloud async publisherpubsub subscriber python
google-cloudasync-messagingpubsub

More Internet packages