In-memory python event library.
Current version is |version|.
$ pip install eventipy
Publishing an event:
import asyncio
from eventipy import events, Event
event = Event(topic="my-topic")
asyncio.run(events.publish(event))
Subscribing to a topic:
from eventipy import events
@events.subscribe("my-topic")
async def event_handler(event: Event):
print(event.id)
print(event.topic)
- dataclasses (for python 3.6 compatability)
.. toctree:: :maxdepth: 2 Publishing events <publishing> Subscribing to topics <subscribing> Reference <reference>