Skip to main content

Match python args and dispatch based on their contents.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnd-0.2.1.tar.gz (5.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page