Skip to main content

Py Async Bus

A simple async event bus in Python

Installing

Install with pip:

$ pip install py-async-bus

Usage

from async_bus import EventBus

bus = EventBus()

@bus.subscribe('event_name')
async def subscriber(param):
    print(param)


bus.emit('event_name', param='test_param')

Disable subscriber

If you want to disable subscribers while testing for example, you can set the env ASYNC_BUS_ENABLE_SUBSCRIBERS to false.

$ ASYNC_BUS_ENABLE_SUBSCRIBERS=false python -m unittest

Tests

$ python -m unittest

Metadata

Release files for py-async-bus 0.0.3

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

Source distribution (sdist)

Source distribution for py-async-bus 0.0.3
File Size Uploaded
py-async-bus-0.0.3.tar.gz 2.5 kB Details

Release files / py-async-bus-0.0.3.tar.gz

Download URL py-async-bus-0.0.3.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
00fc8a806f7737aa1cf4ea2ce5a6526bbaf29909e7c933a0334035c5dc9cf39a
BLAKE2b-256 checksum
How to use checksums
5c9d2afb2040b4631beef830f596fee9c5374f522c3fd354b7a84adf6e01d9e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

2 release files

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