live · 2026 · library
emitix
emitix is a small event bus for Python: no dependencies, fully typed, and
happy in both synchronous and asynchronous codebases. It’s on PyPI as emitix.
Why
Most Python projects eventually need a way to decouple “something happened” from “here’s what to do about it.” emitix keeps that simple - a single import, a decorator, and you’re publishing and subscribing to events.
A minimal example
import emitix
@emitix.on("user.created")def send_welcome_email(user): print(f"Welcome, {user}!")
emitix.emit("user.created", "Ada")What it does
- Passes arbitrary arguments from
emitstraight through to handlers - Wildcard pattern matching for subscriptions
- One-shot handlers via
once() - Priority-based handler ordering
- Async handlers through
emit_async() - Unsubscribe with
off() - Thread-safe by design
await bus.emit_async("order.placed", order)
@emitix.on("order.placed", priority=10) # runs firstdef reserve_stock(order): ...
@emitix.on("order.*") # wildcarddef audit(event, *args): ...Install
pip install emitixLicensed MIT. Source on GitHub.