skillfed

abxbus

Advanced Pydantic-powered event bus with async support

abxbus v2.5.45 206.9K downloads/30d#9,562 on PyPI11
Permissive license Active released

What it is and what it does

Abxbus is an in-memory event bus designed for building event-driven applications in async Python. You define events as Pydantic models, register handlers (sync or async), and emit events through a bus instance. The library handles automatic UUIDv7 generation, monotonic nanosecond timestamps, nested event tracking, and provides options for strict FIFO or fully parallel processing via built-in locking.

It's built to scale from single events to millions per second while keeping the API simple and consistent. The package includes features like event pattern matching (by class, string type, or wildcard), handler return value collection, event forwarding between separate bus instances with automatic loop prevention, and timeout enforcement across nested event hierarchies. It's inspired by JavaScript EventEmitter patterns but adds compile-time type safety through Pydantic and cross-runtime schema compatibility.

Use it for:

  • Build microservice architectures where different services communicate via typed events forwarded between separate EventBus instances.
  • Implement complex async workflows with nested event handling and automatic cancellation when parent events time out.
  • Create real-time applications that emit and handle thousands of events per second with predictable, measurable latency.
  • Define strongly-typed event schemas that can be validated at runtime and potentially shared across Python and other runtimes.
  • Decouple event producers from consumers in a single application using pattern-based subscriptions (by class, string, or wildcard).

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

An in-memory event bus for async Python that lets you emit, subscribe to, and route typed events with automatic tracking, nested event support, and configurable concurrency control.

Yes. Abxbus is actively maintained, has no known vulnerabilities, installs with low friction, and fills a specific niche for async event-driven Python applications. The MIT license is permissive. It's a young project (first release March 2026) with modest popularity, so evaluate whether the feature set (nested events, type safety, cross-runtime schemas) matches your use case before committing to a dependency.

Install

abxbus on PyPI

pip

pip install abxbus

uv

uv add abxbus

poetry

poetry add abxbus

Installing abxbus

Before you install

Low friction install with only three runtime dependencies (pydantic, typing-extensions, uuid7). Active maintenance with a recent release (13 days old) and steady commits; early project (first release March 2026) but no known vulnerabilities.

License in practice

MIT license (permissive) — you can use, modify, and distribute freely with minimal restrictions.

Quickstart

import asyncio
from abxbus import BaseEvent, EventBus

class SomeEvent(BaseEvent):
    some_data: int

async def handle_some_event(event: SomeEvent):
    print('hi!')

async def main():
    bus = EventBus()
    bus.on(SomeEvent, handle_some_event)
    await bus.emit(SomeEvent(some_data=132)).now()

asyncio.run(main())

Requires Python 3.11 or later.

Verify before relying

  • Actual throughput and latency characteristics at scale (description claims ~0.2ms/event and thousands/sec but provides no benchmark data).
  • How well the cross-runtime schema compatibility (Python, TypeScript, Rust, Go) works in practice for real applications.
  • Stability and API maturity given the early release date (first release March 2026, current version 2.5.45).

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 3 — pydantic, typing-extensions, uuid7
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 206,948/month — #9,562 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: abxbus-2.5.45-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

async event bus pythonevent emitter pydanticin-memory event routingtyped event handlingasync event dispatcherevent-driven architecturepython event system
async-event-buspydantic-nativeevent-driven

More Application Frameworks packages