Skip to main content

Extremely Ease Event Emitter. Pub-Sub implementation.

Project description

Info:

Extremely Easy Event Emitter.

Author:

Paweł Zadrożny @pawelzny <pawel.zny@gmail.com>

CI Status Documentation Status PyPI Repository Status Release Status Project Status Supported python versions Supported interpreters License

Features

  • Asynchronous Event emitter based on asyncio

  • Subscribe any callable handler

  • Filter events by Publisher

  • Easy enable-disable events on runtime

  • Subscribe handlers using decorator

Installation

pip install eeee

Package: https://pypi.org/project/eeee/

Documentation

Read full documentation at http://eeee.readthedocs.io/en/stable/

Quick Example

from eeee import Event, Publisher

my_event = Event('MyEvent')

# Subscribe takes publisher instance or name as optional argument.
# If publisher is defined handler will be triggered only when that
# particular publisher send a message.
# Leave empty to listen to all publishers within this event.
@my_event.subscribe()
async def custom_handler(message, publisher, event):
    print(message, publisher, event)

result = await my_event.publish('New message arrived!', Publisher('global'))

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

eeee-0.1.1.tar.gz (41.2 kB view details)

Uploaded Source

File details

Details for the file eeee-0.1.1.tar.gz.

File metadata

  • Download URL: eeee-0.1.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for eeee-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7990253d505ea060d40a4c7a8b3c606b25194cff85348d8a17c4aac4bceb70b8
MD5 47834df374270a1001c834f2feabb878
BLAKE2b-256 7acb3adadaa9f46e0462de40eb4267bbbd146d1945f54cfdc107fc205a72f221

See more details on using hashes here.

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