Skip to main content

Events for asyncio

Project description

aioevents

Events for asyncio (PEP 3156)

Usage

To declare an event:

from aioevents import Event

class Spam:
	egged = Event("The spam has been egged")

To register a handler:

spam = Spam()

@spam.egged.handler
def on_egged(sender, amt):
    print("Spam got egged {} times".format(amt)")

Triggering an event:

spam.egged(42)

Project details


Download files

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

Source Distribution

aioevents-0.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

aioevents-0.2-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page