{"id":2682,"library":"pydispatcher","title":"PyPyDispatcher","description":"Multi-producer-multi-consumer signal dispatching mechanism for Python, originally from PyDispatcher. Version 2.1.2 is actively maintained via the Scrapy project. Releases are infrequent.","status":"active","version":"2.1.2","language":"python","source_language":"en","source_url":"https://github.com/scrapy/pypydispatcher","tags":["signals","events","dispatch"],"install":[{"cmd":"pip install PyDispatcher","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"The package name on PyPI is 'PyDispatcher', but the module is 'pydispatch'.","wrong":"from pydispatcher import dispatcher","symbol":"dispatcher","correct":"from pydispatch import dispatcher"}],"quickstart":{"code":"from pydispatch import dispatcher\n\ndef callback(signal, sender):\n    print(f\"Received signal {signal} from {sender}\")\n\ndispatcher.connect(callback, signal=\"my_signal\")\ndispatcher.send(signal=\"my_signal\", sender=\"app\")","lang":"python","description":"Basic signal dispatch example."},"warnings":[{"fix":"Use 'from pydispatch import dispatcher' consistently.","message":"Import path confusion: install with 'pip install PyDispatcher' but import from 'pydispatch'.","severity":"gotcha","affected_versions":"all"},{"fix":"Always specify sender explicitly (e.g., sender='myapp') to avoid confusion.","message":"Sender requirement: the 'sender' argument in connect() and send() can be None or any object; omitting it may cause unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'dispatcher.connect(callback, signal='...', weak=False)' to keep a strong reference.","message":"Weak references: by default, receivers are stored via weak references. If the callback is a bound method or a lambda, it may be garbage-collected before signal dispatch.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.1.2':16 'activ':18 'consum':6 'dispatch':8,29 'event':28 'infrequ':26 'maintain':19 'mechan':9 'multi':3,5 'multi-producer-multi-consum':2 'origin':12 'produc':4 'project':23 'pydispatch':14 'pypydispatch':1 'python':11 'releas':24 'scrapi':22 'signal':7,27 'version':15 'via':20","created_at":"2026-04-11T01:38:22.200183+00:00","updated_at":"2026-04-27T17:01:43.451344+00:00","problems":[{"fix":"Use 'from pydispatch import dispatcher' after installing PyDispatcher.","cause":"Attempted to import 'pydispatcher' instead of 'pydispatch'.","error":"ModuleNotFoundError: No module named 'pydispatcher'"},{"fix":"Call dispatcher.connect() or dispatcher.send() with the signal string; it is automatically registered.","cause":"The signal was referenced before any connect() or send() call; signals are not pre-registered.","error":"ValueError: Signal 'my_signal' is not registered"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.7","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mcfletch/pydispatcher","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pydispatcher/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication","workflow"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-29","install_tag":null}}