skillfed

pyeventsystem

An event driven middleware library for Python

pyeventsystem v0.1.0 107.4K downloads/30d#12,615 on PyPI1
Permissive license MIT Abandoned released

What it is and what it does

pyeventsystem is a lightweight event-driven middleware library that lets you build systems around event subscription and function interception. It uses decorators to mark functions as event dispatchers or observers, and groups them into middleware classes for organized management. The core idea is that you can hook into function execution at multiple points—before, after, or replacing the call entirely—using a priority-based system to control execution order.

The library is designed for scenarios where you want middleware-style behavior without a full framework. You define event names using dot notation, attach handlers with priorities, and the system routes events through them in order. However, the package has been abandoned since 2019-02-18 and targets outdated Python versions, so it carries maintenance risk for new projects.

Use it for:

  • Building plugin systems where middleware classes can be registered and executed in a defined order around core functions.
  • Implementing logging or monitoring that wraps function calls without modifying the original code.
  • Creating pre- and post-processing pipelines for data transformation or validation.
  • Intercepting function calls to add cross-cutting concerns like authentication or error handling.
  • Organizing event handlers into reusable middleware classes for complex applications.

Worth the install?

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

pyeventsystem provides event-driven middleware for Python, allowing you to subscribe to events, intercept function calls, and inject middleware before, after, or in place of function execution.

No. While the library is simple to install and has no dependencies, it is abandoned (last updated 2019-02-18) and targets obsolete Python versions (2.7, 3.6). For new projects, use a maintained alternative or a framework's built-in event system. Only consider it if you are maintaining legacy code that already depends on it.

Install

pyeventsystem on PyPI

pip

pip install pyeventsystem

uv

uv add pyeventsystem

poetry

poetry add pyeventsystem

Installing pyeventsystem

Before you install

Installation is frictionless with no runtime dependencies, but the package is abandoned—last release was 2019-02-18 with no updates since. It targets Python 2.7 and 3.6, which are now out of support.

License in practice

MIT license is permissive and imposes no significant restrictions on use, modification, or distribution.

Quickstart

from pyeventsystem.middleware import SimpleMiddlewareManager, dispatch, observe

class MyMiddleware:
    def __init__(self, event_dispatcher):
        self.events = event_dispatcher
    
    @dispatch("event.name", priority=2500)
    def handler(self, arg):
        return "result"

manager = SimpleMiddlewareManager()
obj = MyMiddleware(manager.events)
manager.add(obj)
obj.handler("value")

Package targets Python 2.7 and 3.6; compatibility with modern Python versions is unverified.

Verify before relying

  • Whether the package works reliably on Python 3.7 and later versions despite targeting only 3.6.
  • Whether the event system scales to production workloads or is intended for small-scale use.
  • Whether wildcard event patterns (e.g., '*.unfortunate.events') support all expected glob semantics.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,734 days since the last release
Last repo commit
First released
Downloads 107,405/month — #12,615 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyeventsystem-0.1.0-py2.py3-none-any.whl

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

event-driven middleware pythonfunction interception decoratorsevent dispatcher observer patternmiddleware framework pythonevent subscription systembefore after function hooksevent handler grouping
event-drivenmiddlewareabandoned

More Python Modules packages