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 details)

Uploaded Source

File details

Details for the file mnd-0.2.1.tar.gz.

File metadata

  • Download URL: mnd-0.2.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mnd-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0b0372fcf1058bce569acf8008525c4a923990833b62f9ea9a77d9e86c1f7574
MD5 e19a061d7286bce77960d48967007c98
BLAKE2b-256 5346e5db9d08ba87f00eab7d1f3f292c6c1cec59f9885fcc4889d490e38d9ade

See more details on using hashes here.

Supported by

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