bubus

📢 Production-ready python event bus library with support for async and sync handlers, forwarding betwen busses w/ parent event tracking + loop prevention, FIFO and concurrency options, and WAL persistence. Powers the browser-use library.

24 articles 95 View on GitHub ↗
24 articles
How to Debug Event Flow Using log_tree() in bubus

Debug event flow in bubus using the log_tree() function. Generate a formatted string of the complete event-handler hierarchy, timing data, and error states for efficient troubleshooting.

how-to-guide
Feb 26, 2026
How to Handle Concurrent Event Dispatch Without Race Conditions in bubus

Safely handle concurrent event dispatch in bubus. Learn how bubus uses a global lock and custom asyncio queue to prevent race conditions while enabling parallel handler execution for robust event processing.

how-to-guide
Feb 26, 2026
How to Merge Dict Results from Multiple Handlers in bubus

Combine bubus dict results from multiple handlers using await event.event_results_flat_dict(). Detect and filter conflicts easily.

how-to-guide
Feb 26, 2026
How to Filter Event Results with Include/Exclude Predicates in bubus

Master filtering event results with bubus include/exclude predicates. Learn to refine incoming events and handler outcomes for precise control.

how-to-guide
Feb 26, 2026
How Event Path Tracking Works Across Multiple Bubus Buses

Understand how Bubus event path tracking automatically records eventBus history preventing infinite loops in your browserUse/bubus repository for hierarchical routing.

internals
Feb 26, 2026
How to Use Class Methods and Static Methods as Event Handlers in Bubus

Learn how to use class methods and static methods as event handlers in Bubus. Discover how Bubus automatically detects handler protocols and passes class or treats static methods as functions.

how-to-guide
Feb 26, 2026
How Event Parent-Child Relationships Are Tracked in Bubus: A Deep Dive into the EventBus Tree

Discover how Bubus tracks event parent-child relationships using event_parent_id metadata and context-aware dispatch logic for seamless event management. Learn more about the EventBus tree.

deep-dive
Feb 26, 2026
How to Stop and Clean Up an EventBus Instance in bubus: Complete Guide

Learn how to stop and clean up an EventBus instance in bubus. Gracefully shut down, cancel operations, and purge internal state with our complete guide.

how-to-guide
Feb 26, 2026
How to Configure Event Timeouts in Bubus: A Complete Guide

Master Bubus event timeouts with this guide. Learn to set default, instance, or handler-specific limits for reliable event management in your browser-use/bubus project.

how-to-guide
Feb 26, 2026
How to Use Wildcard Event Subscriptions in Bubus

Master Bubus wildcard event subscriptions with bus.on('*', handler) to capture all events. Learn to manage every event dispatched through the bus effectively.

how-to-guide
Feb 26, 2026
How to Aggregate Results from Multiple Handlers in Bubus: A Complete Guide

Learn to aggregate handler results in Bubus. Easily collect, filter, and merge outputs using EventResult helper methods after all handlers complete. Get your complete guide now.

how-to-guide
Feb 26, 2026
How to Handle Errors and Exceptions in Bubus Event Handlers: A Complete Guide

Master Bubus error and exception handling. Learn how Bubus converts exceptions to EventResults, surfaces them, and cancels child events for leak prevention. Get the complete guide.

how-to-guide
Feb 26, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →