PyDispatcher


NamePyDispatcher JSON
Version 2.0.6 PyPI version JSON
download
home_pagehttps://github.com/mcfletch/pydispatcher
SummaryMulti-Producer Multi-Consumer Observer Pattern for Python
upload_time2022-08-31 21:17:51
maintainerMike C. Fletcher
docs_urlNone
author"Patrick K. O'Brien"
requires_python
licenseBSD
keywords dispatcher dispatch pydispatch event signal sender receiver propagate multi-consumer multi-producer saferef robustapply apply
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/87056)
in the [Python Cookbook](http://aspn.activestate.com/ASPN/Python/Cookbook/). The [project](https://github.com/mcfletch/pydispatcher) aims
to include various enhancements to the recipe developed during use in
various applications. It is primarily maintained by [Mike Fletcher](http://www.vrplumber.com). 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](https://mcfletch.github.io/pydispatcher/) 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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mcfletch/pydispatcher",
    "name": "PyDispatcher",
    "maintainer": "Mike C. Fletcher",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "mcfletch@vrplumber.com",
    "keywords": "dispatcher,dispatch,pydispatch,event,signal,sender,receiver,propagate,multi-consumer,multi-producer,saferef,robustapply,apply",
    "author": "\"Patrick K. O'Brien\"",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a7/99/9db7d8b5a04596cde1c94e79db26c9a755015abdbdc88dec7e7e506eafbb/PyDispatcher-2.0.6.tar.gz",
    "platform": "Any",
    "description": "# PyDispatcher Multi-producer Multi-consumer Observables\n\nPyDispatcher provides the Python programmer with a multiple-producer-multiple-consumer signal-registration and\nrouting infrastructure for use in multiple contexts. The mechanism\nof PyDispatcher started life as a highly rated [recipe](http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/87056)\nin the [Python Cookbook](http://aspn.activestate.com/ASPN/Python/Cookbook/). The [project](https://github.com/mcfletch/pydispatcher) aims\nto include various enhancements to the recipe developed during use in\nvarious applications. It is primarily maintained by [Mike Fletcher](http://www.vrplumber.com). A derivative\nof the project provides the Django web framework's \"signal\" system.\n\n## Installation\n\nPyDispatcher is available on PyPI via standard PIP:\n```\npip install PyDispatcher\n```\n\n## Usage\n\n[Documentation](https://mcfletch.github.io/pydispatcher/) is available\nfor detailed usage, but the basic idea is:\n\n```\nfrom pydispatch import dispatcher\n\nmetaKey = \"moo\"\nMyNode = object()\nevent = {\"sample\": \"event\"}\n\n\ndef callback(event=None):\n    \"\"\"Handle signal being sent\"\"\"\n    print(\"Signal received\", event)\n\n\ndispatcher.connect(callback, sender=MyNode, signal=metaKey)\ndispatcher.send(metaKey, MyNode, event=event)\n```\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Multi-Producer Multi-Consumer Observer Pattern for Python",
    "version": "2.0.6",
    "split_keywords": [
        "dispatcher",
        "dispatch",
        "pydispatch",
        "event",
        "signal",
        "sender",
        "receiver",
        "propagate",
        "multi-consumer",
        "multi-producer",
        "saferef",
        "robustapply",
        "apply"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7999db7d8b5a04596cde1c94e79db26c9a755015abdbdc88dec7e7e506eafbb",
                "md5": "38e9a2b00b2aaf7f1b2d9d8fe8dc4b57",
                "sha256": "3d7e4f43c70000a1dca31f92694e99d0101934fa6eab5d5455a758858d86df95"
            },
            "downloads": -1,
            "filename": "PyDispatcher-2.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "38e9a2b00b2aaf7f1b2d9d8fe8dc4b57",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 38230,
            "upload_time": "2022-08-31T21:17:51",
            "upload_time_iso_8601": "2022-08-31T21:17:51.718851Z",
            "url": "https://files.pythonhosted.org/packages/a7/99/9db7d8b5a04596cde1c94e79db26c9a755015abdbdc88dec7e7e506eafbb/PyDispatcher-2.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-08-31 21:17:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "mcfletch",
    "github_project": "pydispatcher",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "pydispatcher"
}
        
Elapsed time: 0.22596s