bubus
Advanced Pydantic-powered event bus with async support
Decision gist · record as of 2026-08-14
Yes. Bubus is actively maintained, has no security vulnerabilities, and offers a clean, Pydantic-integrated API for event-driven async Python. Install it if you're building event-driven applications and want type safety, nested event support, and FIFO ordering out of the box. The low install friction and permissive MIT license make it a low-risk addition. Consider it essential if you're already using Pydantic and need pub-sub patterns.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later; all handlers and event dispatch are async-first, so you must run within an async context.
- Installation is low-friction—a pure Python wheel with six runtime dependencies (aiofiles, anyio, portalocker, pydantic, typing-extensions, uuid7).
- The package is actively maintained with a recent commit history and has been in active development since June 2025.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute it freely in commercial and open-source projects without restriction.
last release 2025-08-30 (349 days) · last repo commit 2026-07-23 · 117 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,213,399 downloads/mo, #1,409 on PyPI
Alternatives
Verify before relying
pip install bubus
from bubus import EventBus, BaseEvent
class UserLoginEvent(BaseEvent):
username: str
async def handle_login(event: UserLoginEvent) -> str:
return f"User {event.username} logged in"
bus = EventBus()
bus.on(UserLoginEvent, handle_login)
event = bus.dispatch(UserLoginEvent(username="alice"))
result = await event.event_result()- Whether the library's performance characteristics (latency, throughput) are documented or tested at scale.
- Production deployment examples or case studies beyond the quickstart.
- Exact behavior of loop prevention when events are forwarded between buses with circular references.
What it is and what it does
Bubus is an event bus library that lets you build event-driven applications in Python using Pydantic models for type-safe event definitions. It handles both async and sync handlers, maintains strict FIFO processing order, and supports nested event dispatch—so handlers can emit child events that are tracked as part of the causality tree. You define events as Pydantic BaseEvent subclasses, register handlers with bus.on(), and dispatch events with bus.dispatch(). The library manages concurrency, result aggregation from multiple handlers, and can forward events between separate bus instances (useful for microservice-like architectures) while preventing infinite loops.
The main dependencies are pydantic (for validation), anyio and aiofiles (for async I/O), portalocker (for file-based locking), and uuid7 (for event IDs). It's designed to feel familiar to developers coming from JavaScript's EventTarget API, bringing that simplicity to Python with full type checking. The library is actively maintained, has no known vulnerabilities, and sits in the top 5000 packages by download volume.
Use it for
- Build microservice architectures where different services communicate via event buses that forward events between each other.
- Implement real-time notification systems where multiple handlers subscribe to the same event and aggregate results.
- Create async workflows where handlers dispatch child events and wait for completion, maintaining a causality tree.
- Design type-safe domain event systems where Pydantic validation ensures all events conform to their schema.
- Handle concurrent async operations with guaranteed FIFO ordering, even when handlers spawn nested events.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Bubus is actively maintained, has no security vulnerabilities, and offers a clean, Pydantic-integrated API for event-driven async Python. Install it if you're building event-driven applications and want type safety, nested event support, and FIFO ordering out of the box. The low install friction and permissive MIT license make it a low-risk addition. Consider it essential if you're already using Pydantic and need pub-sub patterns.
Install
bubus on PyPI
Before you install
Installation is low-friction—a pure Python wheel with six runtime dependencies (aiofiles, anyio, portalocker, pydantic, typing-extensions, uuid7). The package is actively maintained with a recent commit history and has been in active development since June 2025.
Requires Python 3.11 or later; all handlers and event dispatch are async-first, so you must run within an async context.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute it freely in commercial and open-source projects without restriction.
Quickstart
pip install bubus
from bubus import EventBus, BaseEvent
class UserLoginEvent(BaseEvent):
username: str
async def handle_login(event: UserLoginEvent) -> str:
return f"User {event.username} logged in"
bus = EventBus()
bus.on(UserLoginEvent, handle_login)
event = bus.dispatch(UserLoginEvent(username="alice"))
result = await event.event_result()
Verify before relying
- Whether the library's performance characteristics (latency, throughput) are documented or tested at scale.
- Production deployment examples or case studies beyond the quickstart.
- Exact behavior of loop prevention when events are forwarded between buses with circular references.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4.0,>=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesaiofilesanyioportalockerpydantictyping-extensionsuuid7 |
| Maintenance | Actively maintained 349 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,213,399 / month, #1,409 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: bubus-1.5.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pydantic event driven architecture”
- bubusBubus is a Pydantic-powered event bus library that implements…
- eventkiteventkit provides an event-driven framework for building asynchronous…
- omnibase_spiDefines runtime-checkable Protocol contracts and wire-format data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also abxbus · pyventus · azure-servicebus · observable · fastapi-events · aws-cdk.aws-events · queuelib · ovos-bus-client · Pypubsub · PyDispatcher