PyDispatcher-2.0.7
توضیحات
Multi-producer multi-consumer in-memory signal dispatch system
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | PyDispatcher-2.0.7 |
| نام | PyDispatcher |
| نسخه کتابخانه | 2.0.7 |
| نگهدارنده | ['Mike C. Fletcher'] |
| ایمیل نگهدارنده | ['"Mike C. Fletcher" <mcfletch@vrplumber.com>'] |
| نویسنده | Patrick K. O'Brien |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/mcfletch/pydispatcher |
| آدرس اینترنتی | https://pypi.org/project/PyDispatcher/ |
| مجوز | BSD |
# 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
```
[](https://pypi.python.org/pypi/pydispatcher)
[](https://pypi.python.org/pypi/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)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | tox |
نحوه نصب
نصب پکیج whl PyDispatcher-2.0.7:
pip install PyDispatcher-2.0.7.whl
نصب پکیج tar.gz PyDispatcher-2.0.7:
pip install PyDispatcher-2.0.7.tar.gz