sigdispatch

A simple events library.


License
MIT
Install
pip install sigdispatch==0.0.1

Documentation

sigdispatch image Build Status

A simple events library for Python.

>>> import sigdispatch
>>> def on_foo(payload):
...     print 'Received %s.' % payload
...
>>> def another_on_foo(payload):
...     print 'Received %s too.' % payload
...
>>> sigdispatch.observe('foo', on_foo)
<function unobserve at 0x...>
>>> sigdispatch.observe('foo', another_on_foo)
<function unobserve at 0x...>
>>> sigdispatch.emit('foo', [1, 2, 3])
Received [1, 2, 3].
Received [1, 2, 3] too.

See the documentation.