{"id":6841,"library":"pyventus","title":"Pyventus","description":"Pyventus is a modern and robust Python library for event-driven and reactive programming. It provides a comprehensive suite of tools to define, emit, manage, and orchestrate events with ease, using customizable event emitters and flexible responses. The current version is 0.8.0. The library is actively maintained with a regular release cadence, ensuring ongoing compatibility and feature enhancements.","status":"active","version":"0.8.0","language":"en","source_language":"en","source_url":"https://github.com/mdapena/pyventus","tags":["event-driven","reactive-programming","events","async","event-bus","publish-subscribe"],"install":[{"cmd":"pip install pyventus","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Requires Python 3.10 or higher.","package":"python","optional":false},{"reason":"Required for advanced typing features, especially for older Python versions (prior to 3.10) where certain typing features were not yet standard. Became a required dependency in v0.7.0.","package":"typing-extensions","optional":false}],"imports":[{"note":"As of v0.7.0, all event-driven features, including EventEmitter, must be imported from the `pyventus.events` subpackage due to the integration of reactive programming paradigms.","wrong":"from pyventus import EventEmitter","symbol":"EventEmitter","correct":"from pyventus.events import EventEmitter"},{"note":"Similar to EventEmitter, EventLinker and other event-driven features were moved to the `pyventus.events` subpackage in v0.7.0.","wrong":"from pyventus import EventLinker","symbol":"EventLinker","correct":"from pyventus.events import EventLinker"},{"note":"This specific EventEmitter implementation, along with other event-driven components, was moved to `pyventus.events` in v0.7.0.","wrong":"from pyventus import AsyncIOEventEmitter","symbol":"AsyncIOEventEmitter","correct":"from pyventus.events import AsyncIOEventEmitter"}],"quickstart":{"code":"from pyventus.events import AsyncIOEventEmitter, EventEmitter, EventLinker\n\n# Define an event handler using the EventLinker decorator\n@EventLinker.on(\"GreetEvent\")\ndef handle_greet_event():\n    print(\"Hello, World!\")\n\n# Create an event emitter instance\nevent_emitter: EventEmitter = AsyncIOEventEmitter()\n\n# Emit the custom event, triggering the handler\nevent_emitter.emit(\"GreetEvent\")","lang":"python","description":"This quickstart demonstrates the basic event-driven usage of Pyventus. It defines an event handler using the `@EventLinker.on` decorator for a 'GreetEvent' and then emits this event using an `AsyncIOEventEmitter` instance. When the event is emitted, the `handle_greet_event` function is called, printing 'Hello, World!'."},"warnings":[{"fix":"Update import statements from `from pyventus import ...` to `from pyventus.events import ...`.","message":"Breaking change in v0.7.0: All event-driven features (e.g., `EventEmitter`, `EventLinker`) must now be imported from `pyventus.events` instead of directly from the top-level `pyventus` package.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Remove inheritance from `Event` for custom event classes. Review and update any code that explicitly referenced `Event` class properties or methods.","message":"Breaking change in v0.5.0: The base `Event` class was removed due to improved event semantics and redundancy. Custom event classes no longer need to inherit from a base `Event` class.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Review `EventLinker` method calls and update them to use the new names, such as `EventLinker.get_registry()`.","message":"Breaking change in v0.5.0: Several methods of `EventLinker` were renamed. For example, `get_event_registry()` was renamed to `get_registry()`, and `get_events_by_handler()` was renamed to `get_events_by_event_handler()` (later `get_events_from_subscribers()` in closely related updates).","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"If interacting with `EventEmitter`'s internal processing logic or `debug` flags, update method names and flag names accordingly.","message":"Breaking change in v0.3.0: The internal `_execute()` method of `EventEmitter` was renamed to `_process()`. Additionally, all debug flags were renamed from `debug_mode` to `debug` for consistency.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Ensure `typing-extensions` is installed: `pip install typing-extensions`.","message":"The `typing-extensions` package became a required dependency from v0.7.0 onwards to support advanced typing features. If you encounter `ModuleNotFoundError` related to `typing_extensions`, it might be missing.","severity":"gotcha","affected_versions":">=0.7.0"}],"env_vars":null,"last_verified":"2026-04-15T00:00:00.000Z","next_check":"2026-07-14T00:00:00.000Z","problems":[]}