Skip to main content

Dyspatch

A simple package that implements basic events handling in Python.

Installation

pip install dyspatch

Usage

A basic example is as follows:

import dyspatch

users = []

def on_room_join(user):
    print(f'{user} joined the room.')
    users.append(user)
    print(f'We now have {len(users)} users')

events = dyspatch.Events()
events.add_listener('room_join', on_room_join)
events.dispatch('room_join', args=['Alex'])
events.dispatch('room_join', args=['Bob'])

The output is like this:

Alex joined the room.
We now have 1 users
Bob joined the room.
We now have 2 users

Metadata

Release files for dyspatch 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for dyspatch 0.0.1
File Interpreter ABI Platform Actions
dyspatch-0.0.1-py3-none-any.whl Python 3 none any Details for dyspatch-0.0.1-py3-none-any.whl

Release files / dyspatch-0.0.1-py3-none-any.whl

Download URL dyspatch-0.0.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca82c2d0d25f3587944a824685d30729cc7528a2c5d12fdb6e7419f8bb3acb11
BLAKE2b-256 checksum
How to use checksums
5a941585c9630877021232755ea0b4b03a9cf34a29d7094c21d33dcda849c286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7

Security for dyspatch 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page