Event dispatcher (see python-whistle.github.io).
Project description
Whistle is a lightweight python library that allow your application components to communicate with each other by dispatching events and listening to them.
Homepage: https://python-whistle.github.io/
Install
pip install whistle
Quick start
Install the whistle package:
$ pip install whistle
Create an event dispatcher:
from whistle import EventDispatcher
dispatcher = EventDispatcher()
Add a listener to react to events
def on_spectacle_starts(event):
print('Please turn down your phones!')
dispatcher.add_listener('spectacle.starts', on_spectacle_starts)</code></pre>
Dispatch!
dispatcher.dispatch('spectacle.starts')
Made with ♥ by Romain Dorgueil and contributors.
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
whistle-1.0.1.tar.gz
(4.5 kB
view details)
Built Distributions
whistle-1.0.1-py3.6.egg
(7.3 kB
view details)
whistle-1.0.1-py3.5.egg
(7.3 kB
view details)
File details
Details for the file whistle-1.0.1.tar.gz
.
File metadata
- Download URL: whistle-1.0.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 960775d90bd26cab4b135df901593cee7ae9e99c489d4e2c8d6224355c5f2b90 |
|
MD5 | e08c7659a8cfb0f8a9c54f54682bbc22 |
|
BLAKE2b-256 | 94d1ead7c9c53b5a39a131ccd89e9d4c95f4e810d7c310eb7d6bea275eaecd63 |
File details
Details for the file whistle-1.0.1-py3.6.egg
.
File metadata
- Download URL: whistle-1.0.1-py3.6.egg
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75ed6427bf6f01b2ae641dc3eb24b0734798d315b80e6861ff0e90909f8f2653 |
|
MD5 | 27c5181e2360fa19256d4af2f03c9aa2 |
|
BLAKE2b-256 | cbd49b636ddcb22be73258a4ac38a9689ec908ef21e6993bb767e7fbd60b2fa1 |
File details
Details for the file whistle-1.0.1-py3.5.egg
.
File metadata
- Download URL: whistle-1.0.1-py3.5.egg
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356e894f36bcb06b50107fb26c5dfc8471368648a409f1a8f63cb86eeb707234 |
|
MD5 | 30a564c6365026918e49d68e52c0ffa4 |
|
BLAKE2b-256 | 5d1cab5e895d4199e17528c2856a42ba57213cb1fc94b612dfa39623a7e104d4 |
File details
Details for the file whistle-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: whistle-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb38d24a97b2ebc436aad3e79e28f8782dc31fb94a6568532655d02be727fd57 |
|
MD5 | 4e868f22c3c7d6ecb852630d654e7ba3 |
|
BLAKE2b-256 | 6388b7efd8f76a2f2bd9ba5767345e724e2d29cf618c8de489d093fb887aa6a8 |