live · 2026 · library

emitix

A lightweight, zero-dependency, fully-typed event bus for Python - works with both sync and async code.

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

quickstart.py
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 emit straight 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
async + priority
await bus.emit_async("order.placed", order)
@emitix.on("order.placed", priority=10) # runs first
def reserve_stock(order): ...
@emitix.on("order.*") # wildcard
def audit(event, *args): ...

Install

Terminal window
pip install emitix

Licensed MIT. Source on GitHub.