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.
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 Handle Concurrent Event Dispatch Without Race Conditions in bubusSafely 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 Merge Dict Results from Multiple Handlers in bubusCombine bubus dict results from multiple handlers using await event.event_results_flat_dict(). Detect and filter conflicts easily.
How to Filter Event Results with Include/Exclude Predicates in bubusMaster filtering event results with bubus include/exclude predicates. Learn to refine incoming events and handler outcomes for precise control.
How Event Path Tracking Works Across Multiple Bubus BusesUnderstand how Bubus event path tracking automatically records eventBus history preventing infinite loops in your browserUse/bubus repository for hierarchical routing.
How to Use Class Methods and Static Methods as Event Handlers in BubusLearn 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 Event Parent-Child Relationships Are Tracked in Bubus: A Deep Dive into the EventBus TreeDiscover 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.
How to Stop and Clean Up an EventBus Instance in bubus: Complete GuideLearn 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 Configure Event Timeouts in Bubus: A Complete GuideMaster 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 Use Wildcard Event Subscriptions in BubusMaster Bubus wildcard event subscriptions with bus.on('*', handler) to capture all events. Learn to manage every event dispatched through the bus effectively.
How to Aggregate Results from Multiple Handlers in Bubus: A Complete GuideLearn 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 Handle Errors and Exceptions in Bubus Event Handlers: A Complete GuideMaster 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.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →