Metadata-Version: 2.4
Name: avyra
Version: 1.2.0
Summary: Lightweight, thread-safe publish-subscribe event bus
Project-URL: Homepage, https://github.com/Nytrox/avyra
Project-URL: Repository, https://github.com/Nytrox/avyra
Author: Nytrox
License: MIT
License-File: LICENSE
Keywords: event-bus,events,priority,pub-sub,publish-subscribe,thread-safe
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Description-Content-Type: text/markdown

# Avyra

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

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://python.org)
[![Tests](https://img.shields.io/badge/tests-107%20passed-green)](tests/)
[![PyPI](https://img.shields.io/badge/pypi-avyra-blue)](https://pypi.org/project/avyra/)

```bash
pip install avyra
```

```python
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 →](GUIDE.md)**  |  **[Documentation →](DOCUMENTATION.md)**  |  **[Changelog →](CHANGELOG.MD)**  |  **[License →](LICENSE)**

## Why Avyra?

Avyra provides a lightweight event system without external dependencies,
designed for applications where components need to communicate without
direct coupling.

### Tests

```bash
python -m pytest tests/ -v
```

107 tests covering subscribe, unsubscribe, emit, once, has_subscriber,
clear, register, priority, edge cases, and thread safety.

### Examples

```bash
python example/chat.py
python example/downloader.py
python example/once_usage.py
python example/async_usage.py
```
