Skip to main content
evee
=====

[![Build Status](https://travis-ci.org/onema/evee.svg?branch=master)](https://travis-ci.org/onema/evee)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/51bb12b95a434798b8044e301659ea85)](https://www.codacy.com/app/onema/evee?utm_source=github.com&utm_medium=referral&utm_content=onema/evee&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/51bb12b95a434798b8044e301659ea85)](https://www.codacy.com/app/onema/evee?utm_source=github.com&utm_medium=referral&utm_content=onema/evee&utm_campaign=Badge_Coverage)
[![Code Climate](https://codeclimate.com/github/onema/evee/badges/gpa.svg)](https://codeclimate.com/github/onema/evee)
[![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)

Summary
_______

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.

Install
--------
`pip install evee`

Usage
--------

### Dispatching simple events

```python
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()
dispatcher.add_listener('pre.foo', pre_foo)
dispatcher.add_listener('post.foo', post_foo)
dispatcher.dispatch('pre.foo')
print('Doo Foo work')
dispatcher.dispatch('post.foo')
```


Metadata

Release files for evee 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evee 0.2.0
File Size Uploaded
evee-0.2.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for evee 0.2.0
File Interpreter ABI Platform
evee-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / evee-0.2.0.tar.gz

Download URL evee-0.2.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c62ceeb5391a6268712bfb47ba876064c3387911f00c4b1515180be461545503
BLAKE2b-256 checksum
How to use checksums
f3b0ece07628dd92ed84b78203a2f9f2bb3e3d126ec56b8689666cca2153bdfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/36.2.7 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.2

Release files / evee-0.2.0-py3-none-any.whl

Download URL evee-0.2.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14c8ca2e36e35923737e2f869428565f74c937e55ff8517eacdccfd11f509880
BLAKE2b-256 checksum
How to use checksums
0c894cb7ea725b1ce1b0296a7855a8031bd26990cbeefecb1874f2bb1c7a117a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/36.2.7 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.2

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page