Whistle is an Event Dispatcher library for the Python 3.5+ language.
It's largely inspired from Symfony's EventDispatcher component.
Using an event dispatcher is a great way to write loosely coupled extensible code, having each part only communicate using light events.
$ pip install whistle
from whistle import EventDispatcher dispatcher = EventDispatcher()
def on_spectacle_starts(event): print('Please turn down your phones!') dispatcher.add_listener('spectacle.starts', on_spectacle_starts)
Whistle and the surrounding material (like this website) is licensed under the Apache License, version 2.0.