Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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.

Project Description
evee
=====

[![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)
[![Build Status](https://travis-ci.org/onema/evee.svg?branch=master)](https://travis-ci.org/onema/evee)
[![Coverage Status](https://coveralls.io/repos/github/onema/evee/badge.svg?branch=master)](https://coveralls.io/github/onema/evee?branch=master)

Summary
_______

This is a port for Python `v3.3+` of the Symfony Event Dispatcher `v3.0`.

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
--------

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')
```


Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
evee-0.1.0-py3-none-any.whl (8.4 kB) Copy SHA256 Checksum SHA256 py3 Wheel Aug 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting