Skip to main content

Avyra

v1.2.0 : Lightweight, thread-safe publish-subscribe event bus.

License: MIT Python Tests PyPI

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 : Enum members, not strings.
  • Thread-safe : RLock-protected mutations, snapshot dispatch.
  • Priority : subscriber execution order via priority parameter.
  • 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)

Source distribution for avyra 1.2.0
File Size Uploaded
avyra-1.2.0.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for avyra 1.2.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.1

2 release files

1.0.0

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