Metadata-Version: 2.4
Name: asyncev
Version: 1.0.1
Summary: Asynchronous named events with no dependencies
Project-URL: Homepage, https://github.com/acetylen/asyncev
Project-URL: Issues, https://github.com/acetylen/asyncev/issues
Author: Emil Tylén
License-Expression: MIT
License-File: LICENSE
Keywords: async,asyncio,event,library
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

AsyncEv: asynchronous event objects
===================================

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asyncev)

AsyncEv leverages `asyncio` to create events that can be subscribed to and waited for.

## Installation

    pip install asyncev

## Usage

```python
import asyncio
import asyncev
from dataclasses import dataclass

# Create an event
@dataclass
class MyEvent(asyncev.Event):
    value: str

# Create a handler
async def on_myevent(ev: MyEvent):
    print(f"Got a MyEvent with the value {ev.value}!")

asyncev.bind(MyEvent, on_myevent)

# Emit event (requires a running asyncio event loop)
async def main():
    asyncev.emit(MyEvent(value="hello world"))
    
asyncio.run(main())
```

## Development

Recommended tooling is [`uv`](https://astral.sh/uv).

### Building

    $ uv build

### Testing

    $ uv run tox
