skillfed

PyDispatcher

Multi-producer multi-consumer in-memory signal dispatch system

pydispatcher v2.0.7 3.4M downloads/30d#2,644 on PyPI40
Permissive license BSD DORMANT released

What it is and what it does

PyDispatcher is a lightweight in-memory signal-dispatch library that decouples event producers from event consumers through a registration and routing mechanism. You register callback functions to listen for signals identified by a key and sender, then dispatch signals from anywhere in your code; all registered listeners for that signal-sender pair are invoked with the event data.

The library originated as a Python Cookbook recipe and is now used as the foundation for signal systems in other frameworks. It has no runtime dependencies and installs cleanly. However, the project is dormant—the last release was 2023-02-17 and the last commit was 2024-05-15—so it receives no active maintenance or new features, though the core mechanism is stable.

Use it for:

  • Decouple application components by having them communicate via signals rather than direct function calls or imports.
  • Build event-driven architectures where multiple handlers need to react to the same application event.
  • Implement plugin systems where plugins register callbacks for application lifecycle or data events.
  • Create observer patterns in frameworks to notify multiple listeners when underlying data changes.

Worth the install?

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

PyDispatcher implements a signal-dispatch system where multiple producers can send signals that multiple consumers listen for and handle via registered callbacks.

Yes, if you need a lightweight, zero-dependency signal-dispatch mechanism and accept that the project is no longer actively maintained. The code is stable and battle-tested, making it suitable for production use in applications that don't require ongoing updates. Avoid it if you need active maintenance, bug fixes, or support for the latest Python features.

Install

pydispatcher on PyPI

pip

pip install pydispatcher

uv

uv add pydispatcher

poetry

poetry add pydispatcher

Installing PyDispatcher

Before you install

Installation is straightforward with no runtime dependencies. The package is dormant—last release was 2023-02-17 and last commit 2024-05-15—so expect no active maintenance or bug fixes, though the codebase is stable enough for production use in established projects.

License in practice

BSD license is permissive, allowing commercial and private use with minimal restrictions; you may use and modify freely provided you retain the license notice.

Quickstart

pip install PyDispatcher

from pydispatcher import dispatcher

def callback(event=None):
    print("Signal received", event)

metaKey = "moo"
MyNode = object()
dispatcher.connect(callback, sender=MyNode, signal=metaKey)
dispatcher.send(metaKey, MyNode, event={"sample": "event"})

Verify before relying

  • Whether the package works reliably with modern Python versions beyond those listed in classifiers (Python 2 and 3 are noted but no specific versions given).
  • Performance characteristics under high-volume signal dispatch or with many registered callbacks.
  • Current stability and reliability in production systems given dormant maintenance status.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,274 days since the last release
Last repo commit
First released
Downloads 3,380,967/month — #2,644 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: PyDispatcher-2.0.7-py3-none-any.whl

Keywords: dispatcher, dispatch, pydispatch, event, signal, sender, receiver, propagate, multi-consumer, multi-producer, saferef, robustapply, apply

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

signal dispatch systemevent observer patternmulti-producer multi-consumercallback registrationin-memory event routingpublish subscribe patternsignal sender receiver
event-drivenobserver-patterndecoupling

More Python Modules packages