Skip to main content

A port of node.js's EventEmitter to python with mqtt topics support.

Project description

pyee supplies an event_emitter object that acts similar to the EventEmitter that comes with node.js.

Example

In [1]: from pyee import EventEmitter

In [2]: ee = EventEmitter()

In [3]: @ee.on('a/#/c')
   ...: def event_handler():
   ...:     print 'BANG BANG'
   ...:

In [4]: ee.emit('a/b/c')
BANG BANG

In [5]:

Easy-peasy.

There is the possibility to use mqtt topic patterns to match events

For more, visit <https://github.com/jesusabdullah/pyee> .

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

pyee-topics-0.0.10.tar.gz (4.5 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