skillfed

pyventus

A Python library for event-driven and reactive programming.

pyventus v0.8.0 540.7K downloads/30d#6,100 on PyPI110
Permissive license MIT Active released

What it is and what it does

Pyventus provides a decorator-based framework for event-driven programming in Python, letting you subscribe to named events and emit them from anywhere in your code. It supports both synchronous and asynchronous handlers, and works in both sync and async contexts. The library also includes a reactive programming layer with observable tasks and streaming, allowing you to define data sources that yield values over time and subscribe to them with callbacks. Both paradigms are built on a single runtime dependency (typing-extensions) and rely on the Python standard library, making installation lightweight.

The library is designed for developers building asynchronous or event-based applications who want a simple, intuitive API without heavy framework overhead. You can mix sync and async code freely, control how asynchronous work completes (success or error), and organize your codebase around discrete events and their handlers. It's actively maintained, supports Python 3.10 through 3.14, and carries no known security vulnerabilities.

Use it for:

  • Build loosely-coupled microservices or modular applications where components communicate via named events.
  • Implement reactive data pipelines that yield values over time and notify subscribers of changes.
  • Create async task orchestration where you emit events to trigger dependent workflows and handle their completion.
  • Develop real-time applications (dashboards, live feeds) using observable streams and subscriptions.
  • Refactor callback-heavy code into cleaner event-driven patterns with decorators.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pyventus is a Python library for building event-driven and reactive applications with support for both synchronous and asynchronous code, using decorators and event emitters to link callbacks to named events or observable streams.

Yes. Pyventus is a lightweight, actively maintained library with low install friction, no known vulnerabilities, and a permissive MIT license. It fills a clear niche for event-driven and reactive programming in Python without heavy dependencies. Install it if you need a simple event emitter or observable framework; skip it if your application is already built around a larger framework (Django, FastAPI) that provides its own event handling.

Install

pyventus on PyPI

pip

pip install pyventus

uv

uv add pyventus

poetry

poetry add pyventus

Installing pyventus

Before you install

Low friction: pure Python wheel with only typing-extensions as a runtime dependency. Active maintenance with recent commits and a stable release history since late 2023.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package provided you include the license notice.

Quickstart

pip install pyventus

from pyventus.events import AsyncIOEventEmitter, EventLinker

@EventLinker.on("MyEvent")
def handle_event():
    print("Event fired")

emitter = AsyncIOEventEmitter()
emitter.emit("MyEvent")

Requires Python 3.10 or higher.

Verify before relying

  • Performance characteristics and benchmarks compared to other event libraries.
  • Whether optional integrations (Redis Queue, Celery) are production-ready.
  • Scalability limits for high-volume event streams or large subscriber counts.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 166 days since the last release
Last repo commit
First released
Downloads 540,667/month — #6,100 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyventus-0.8.0-py3-none-any.whl

Keywords: EventEmitter, asynchronous, asynchronous programming, asynchronous-programming, event, event driven, event driven programming, event emitter, event emitters, event-driven, event-driven programming, events, observable, observables, observer, observer pattern, observers, reactive, reactive programming, reactive-programming

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

event emitter library pythonreactive programming pythonevent-driven architectureasync event handlingobservable streams pythonevent dispatcherobserver pattern implementation
event-drivenreactive-programmingasync-support

More Software Development packages