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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for babichjacob_emitter-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff3ca375a6ad1e6e0864c214ccf4e4050d0f6e878143fd289ac52ae135c6880e |
|
MD5 | f7df4abe19b793adb9b5f481c3b1c9e1 |
|
BLAKE2b-256 | 72b0ba09f9af2cf17c4cf17709598b0eb526963d70412cda3324a4c3eb9b2948 |
Close
Hashes for babichjacob_emitter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02849e0f4db477130add3c0a00a3206458bda0be4c20bee364dc0fe233def069 |
|
MD5 | 055e7039dc541afbaaa71298f100dcb3 |
|
BLAKE2b-256 | 3d5b3e55b2eeff18cb3baaf412781f7048e757c5eb57eeb015490a8bb4cdb8b6 |