Skip to main content

Event manager library

Project description

OnAny is a simple yet powerful event manager library, where you can declare listeners and dispatch as much events as needed to them.

How To

To listen and dispatch events is very simple:

from onany import dispatch, listener

@listener("event.name")
def on_event_name(*args, **kwargs):
    print("I've been called with {} and {}".format(
        args,
        kwargs
    ))

>>> dispatch(
    "event.name",
    "first_param",
    "second_param",
    "third_param",
    first="param",
    second="param",
    third="param")

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

onany-0.1.2.tar.gz (1.9 kB view hashes)

Uploaded Source

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