Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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)

Scaling

Two structures keep dispatch cost proportional to the work a signal actually implies rather than to the size of the program around it.

Wiring many receivers to one sender. connect() guards against registering the same receiver twice for a (sender, signal) pair. An index of what is already registered answers that in constant time, so wiring N receivers to a shared sender costs O(N) rather than O(N²). The index is an optimisation hint: every real registration records itself there, so "not registered" is always trustworthy, and a stale "registered" costs one scan and nothing else.

Calling a receiver. robustApply passes a receiver only the arguments it will accept, which means knowing its parameters. Those come from the receiver's code object, which never changes, so they are derived once and reused -- robustapply.SIGNATURE_CACHE_SIZE bounds how many are remembered. A call with no keyword arguments needs no signature at all, since there is nothing to subset.

Metadata

Release files for PyDispatcher 2.0.9a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyDispatcher 2.0.9a1
File Size Uploaded Provenance Actions
pydispatcher-2.0.9a1.tar.gz 45.9 kB With provenance Details for pydispatcher-2.0.9a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PyDispatcher 2.0.9a1
File Interpreter ABI Platform Actions
pydispatcher-2.0.9a1-py3-none-any.whl Python 3 none any Details for pydispatcher-2.0.9a1-py3-none-any.whl

Total release size: 61.2 kB

Release files / pydispatcher-2.0.9a1.tar.gz

Download URL pydispatcher-2.0.9a1.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b65c38b487b6adb6c8a65fb13f1d4907fd293b84fdb723f66a0ef1c68fbbb29f
BLAKE2b-256 checksum
How to use checksums
5efcd03be994630181add212c56f65acb026aba8eaeaf1abcdfc6984cab003ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / pydispatcher-2.0.9a1-py3-none-any.whl

Download URL pydispatcher-2.0.9a1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1fa2f13d1d49e14baa19f8443784ca533827b01ef2b83dc930eecb486a596bd3
BLAKE2b-256 checksum
How to use checksums
a476236c4d1225fcb0212bc0e5269da8534878c812fa9ab6931083a2c19b3df1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Security for PyDispatcher 2.0.9a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydispatcher-2.0.9a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page