Avyra
v1.2.0 : Lightweight, thread-safe publish-subscribe event bus.
pip install avyra
from enum import Enum, auto
from avyra import EventBus
class Message(Enum):
SENT = auto()
READ = auto()
bus = EventBus()
bus.register(Message)
@bus.on(Message.SENT)
def handler(event, payload):
print(f"Sent: {payload}")
bus.emit(Message.SENT, "Hello!")
- Typed events :
Enummembers, not strings. - Thread-safe : RLock-protected mutations, snapshot dispatch.
- Priority : subscriber execution order via
priorityparameter. - Zero dependencies : pure Python.
Guide → | Documentation → | Changelog → | License →
Why Avyra?
Avyra provides a lightweight event system without external dependencies, designed for applications where components need to communicate without direct coupling.
Tests
python -m pytest tests/ -v
107 tests covering subscribe, unsubscribe, emit, once, has_subscriber, clear, register, priority, edge cases, and thread safety.
Examples
python example/chat.py
python example/downloader.py
python example/once_usage.py
python example/async_usage.py
Metadata
Release files for avyra 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| avyra-1.2.0.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| avyra-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / avyra-1.2.0.tar.gz
| Download URL | avyra-1.2.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59180869758fe685514c72c8fde09019b54b03b5f4b784387356c10c7e7f4c87
|
|
BLAKE2b-256 checksum How to use checksums |
0727f0730cd31ad39c9bab4146ef4e1043a39bbddcb6a95a3fb96d4df3146757
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / avyra-1.2.0-py3-none-any.whl
| Download URL | avyra-1.2.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fff06d1700694c78bb394444a27225c9df85640e07d65898bde8c49755a74f18
|
|
BLAKE2b-256 checksum How to use checksums |
8afda4e5ec81aace56f37566502fb3dc628b7e2052af258753998e03297f3881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|