This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Event dispatch in Python 3.5 using asyncio

Installation

pip install accordian

Getting Started

import asyncio
import accordian
import random

loop = asyncio.new_event_loop()

dispatch = accordian.Dispatch(loop=loop)
dispatch.register("my_event", ["id", "value"])


@dispatch.on("my_event")
async def handle(id, value):
    sleep = 5.0 * random.random()
    print("Handling `my_event(id={})` in {} seconds.".format(id, sleep))
    await asyncio.sleep(sleep, loop=loop)
    print("`Completed my_event(id={})`!".format(id))


ids = range(4)
values = [random.random() for _ in ids]
for id, value in zip(ids, values):
    params = {"id": id, "value": value}
    dispatch.trigger("my_event", params)

loop.create_task(dispatch.start())
loop.run_until_complete(asyncio.sleep(0.01, loop=loop))
loop.run_until_complete(dispatch.stop())

Contributing

Contributions welcome! Please make sure tox passes (including flake8) before submitting a PR.

Development

accordian uses tox, pytest and flake8. To get everything set up:

# RECOMMENDED: create a virtualenv with:
#     mkvirtualenv accordian
git clone https://github.com/numberoverzero/accordian.git
pip install tox
tox
Release History

Release History

0.3.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
accordian-0.3.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Jan 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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