Skip to main content

Nanoevent is a terrifically small and simple event bus implementation

Project description

Nanoevent

Nanoevent is a terrifically small and simple event dispatching library for Python 3.6+. It's key features:

  • Easy enough to start using in minutes.
  • Pretty feature complete.
  • Designed to be super simple to use.

Installation

pip install nanoevent

User guide

import nanoevent

d = nanoevent.Dispatcher()

def handler(value):
    print(value)

d.attach('event:name', handler)

# The following results in "Hi, this is a test" being printed.
d.emit('event:name', 'Hi, this is a test')

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

nanoevent-1.1.0.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