PyDispatcher (2.0.7)

Published 2026-02-24 14:09:25 +00:00 by atheaadmin

Installation

pip install --index-url  PyDispatcher

About this package

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

PyDispatcher Multi-producer Multi-consumer Observables

PyDispatcher provides the Python programmer with a multiple-producer-multiple-consumer signal-registration and routing infrastructure for use in multiple contexts. The mechanism of PyDispatcher started life as a highly rated recipe in the Python Cookbook. The project aims to include various enhancements to the recipe developed during use in various applications. It is primarily maintained by Mike Fletcher. A derivative of the project provides the Django web framework's "signal" system.

Installation

PyDispatcher is available on PyPI via standard PIP:

pip install PyDispatcher

Latest PyPI Version Latest PyPI Version

Usage

Documentation is available for detailed usage, but the basic idea is:

from pydispatch import dispatcher

metaKey = "moo"
MyNode = object()
event = {"sample": "event"}


def callback(event=None):
    """Handle signal being sent"""
    print("Signal received", event)


dispatcher.connect(callback, sender=MyNode, signal=metaKey)
dispatcher.send(metaKey, MyNode, event=event)
Details
PyPI
2026-02-24 14:09:25 +00:00
1
Patrick K. O'Brien
BSD
12 KiB
Assets (1)
Versions (1) View all
2.0.7 2026-02-24