async-dispatch

Dispatches events from a publisher to any number of subscribers.


Keywords
asyncio, events, queue
License
MIT
Install
pip install async-dispatch==0.1

Documentation

Async Dispatch

Python Asyncio-enabled Event Dispatcher Based on Publishers and Subscribers

Build Status

https://travis-ci.org/tobypatterson/async-dispatch.svg?branch=master https://readthedocs.org/projects/async-dispatch/badge/?version=latest

Requirements

Async Dispatch uses the keywords async and await, and thus requires Python 3.5 or greater. This version of Python is distributed in the most recent release of Ubuntu 16.04, and can be easily installed on Mac OS X using brew .

Installation

The prefered way to install Async Dispatch for Python 3.5 is using pip:.

pip install async-dispatch

Basic Usage

Documentation will soon be available on readthedocs. Here is a brief summary.

publisher = BasicPublisher()
subscriber = BasicSubscriber()

loop = asyncio.get_event_loop()

server = Dispatcher(publisher, subscriber, loop=loop)
loop.run_until_complete(server.start(max_events=5))

Documentation

Best to Read The Docs.