Multi-producer multi-consumer in-memory signal dispatch system
Project Links
Meta
Author: Patrick K. O'Brien
Maintainer: Mike C. Fletcher
Classifiers
License
- OSI Approved :: BSD License
Programming Language
- Python
- Python :: 2
- Python :: 3
Topic
- Software Development :: Libraries :: Python Modules
Intended Audience
- Developers
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
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)
2.0.9a1
Sep 12, 2026
2.0.7
Feb 17, 2023
2.0.6
Aug 31, 2022
2.0.5
Jan 15, 2015
2.0.4
Jan 01, 2015
2.0.3
Sep 19, 2011
2.0.2
Mar 30, 2010
2.0.1
Aug 21, 2009