Match 'n Dispatch
Match python args and dispatch based on their contents.
Getting started
Create a dispatcher
from mnd.dispatch import Dispatcher, handle
d = Dispatcher()
Use the handy decorator
>>> @handler(d, msg="hello")
>>> def say(msg=None):
... print "got message: ", msg
Try dispatching some events
```python
>>> d.dispatch(msg="gets filtered out..."))
>>> d.dispatch(msg="hello"))
got message: hello
Install
$ pip install mnd
Match python args and dispatch based on their contents.
Getting started
Create a dispatcher
from mnd.dispatch import Dispatcher, handle
d = Dispatcher()
Use the handy decorator
>>> @handler(d, msg="hello")
>>> def say(msg=None):
... print "got message: ", msg
Try dispatching some events
```python
>>> d.dispatch(msg="gets filtered out..."))
>>> d.dispatch(msg="hello"))
got message: hello
Install
$ pip install mnd
Metadata
Release files for mnd 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mnd-0.2.1.tar.gz | 5.4 kB | Details |
Release files / mnd-0.2.1.tar.gz
| Download URL | mnd-0.2.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b0372fcf1058bce569acf8008525c4a923990833b62f9ea9a77d9e86c1f7574
|
|
BLAKE2b-256 checksum How to use checksums |
5346e5db9d08ba87f00eab7d1f3f292c6c1cec59f9885fcc4889d490e38d9ade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |