Rudra-narayan-muduli-001/Python-Event_Bus ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple Python event bus library for an AI agent, something I can use to publish events and let different parts of the app react to them without being tightly coupled.

I want it to support both sync and async handlers, a nice decorator for subscribing to events, and a clean way to emit events with payloads. Please include priority based dispatching, filtering by things like event name or category, and a middleware pipeline for things like logging, rate limiting, deduping, metrics, and context propagation. It should also keep track of correlation and causation IDs, validate events against a known registry, and store events so they can be queried and replayed later. If it makes sense, add basic dependency injection support, a config loader, and tamper evident audit logging. Make it thread safe and usable from a small example app. Look up current docs online if you need to, but keep the code simple and practical.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab