Skip to main content

AioPubSub

https://travis-ci.com/theruziev/aio_pubsub.svg?branch=master https://codecov.io/gh/theruziev/aio_pubsub/branch/master/graph/badge.svg

A generic interface wrapping multiple backends to provide a consistent pubsub API.

Installation

pip install aio-pubsub
# for redis backend
pip install aio-pubsub[aioredis]
# for postgresql backend
pip install aio-pubsub[aiopg]

Usage

To use it, you need to implement your pubsub implementation from interfaces or use backends from aio_pubsub.backends package

from aio_pubsub.backends.memory import MemoryPubSub
pubsub = MemoryPubSub()
# Create subscriber
subscriber = await pubsub.subscribe("a_chan")

# Push message
await pubsub.publish("a_chan", "hello world!")
await pubsub.publish("a_chan", "hello universe!")

# And listening channel
try:
    async for message in subscriber:
        print(message, flush=True)
except KeyboardInterrupt:
    print("Finish listening")

Supported backends

Disclaimer: I would not advise you to use this backend, because it is shown only for testing purposes. Better develop your own implementation.

  • memory

  • redis

  • postgresql

Metadata

Release files for aio-pubsub 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aio-pubsub 0.3.0
File Size Uploaded Provenance Actions
aio_pubsub-0.3.0.tar.gz 4.0 kB Without provenance Details for aio_pubsub-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aio-pubsub 0.3.0
File Interpreter ABI Platform Actions
aio_pubsub-0.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for aio_pubsub-0.3.0-py2.py3-none-any.whl

Total release size: 10.2 kB

Release files / aio_pubsub-0.3.0.tar.gz

Download URL aio_pubsub-0.3.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4dad264093e1feab45680728175afb81994ede3861ec2e368b9ef4d3453b2386
BLAKE2b-256 checksum
How to use checksums
67ee45cb46b2d772208299e7dcf91df8daab5acfacb6eee44431830fefc05fac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.3

Release files / aio_pubsub-0.3.0-py2.py3-none-any.whl

Download URL aio_pubsub-0.3.0-py2.py3-none-any.whl
Size 6.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
faad5aaa91dd901494f8d575f86cc955dba4b41ad8bdbcafa77955592e5e02d9
BLAKE2b-256 checksum
How to use checksums
2a9db6df7fc99c036fcbfa971108984270835fb8f32f14c9497ce8be59ed8700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.3

Security for aio-pubsub 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page