Skip to main content

An event emitter

Project description

📻 Emitter

This library provides the emitter data type. An emitter calls listening handlers whenever an event is emitted. This allows the separation of sourcing an event and reacting to it.

💻 Installation

This package is published to PyPI as babichjacob-emitter.

🛠 Usage

from emitter import emittable

my_emitter = emittable()
my_emitter.listen(lambda event: print(f"Received the event {event}"))
my_emitter.emit(23) # "Received the event 23" gets printed

😵 Help! I have a question

Create an issue and I'll try to help.

😡 Fix! There is something that needs improvement

Create an issue or pull request and I'll try to fix.

📄 License

MIT

🙏 Attribution

This README was generated with ❤️ by readme-md-generator

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

babichjacob_emitter-0.2.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

babichjacob_emitter-0.2.0-py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 3

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