Evee is an event dispatcher port of the Symfony Event Dispatcher Component. It allows your applications to communicate with one another by dispatching and listening for events.
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/onema/evee/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/onema/evee/?branch=master)
This is a port for Python `v3.6+` of the Symfony Event Dispatcher.
This event dispatcher follows a pattern called the ["Mediator" pattern](https://sourcemaking.com/design_patterns/mediator).
> In software engineering, the mediator pattern defines an object that encapsulates how a set of objects interact. This pattern is considered to be a behavioral pattern due to the way it can alter the program's running behavior.
`pip install evee`
### Dispatching simple events
from evee import EventDispatcher
from evee import Event
def pre_foo(self, event: Event, event_name: str):
print("pre_foo was called")
def post_foo(self, event: Event, event_name: str):
print("post_foo was called")
dispatcher = EventDispatcher()
print('Doo Foo work')
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.