Skip to main content

A lightweight, pure-Python event dispatcher for building decoupled applications.

PyPI Python Versions CI Status License

Key Features:

  • 🚀 Pure Python - No external dependencies

  • 🔄 Sync & Async - Full support for both synchronous and asynchronous workflows

  • 🎯 Type Safe - Prevents mixing sync and async listeners

  • 📦 Lightweight - Minimal footprint, maximum flexibility

  • 🎛️ Priority Control - Order listener execution

  • ⚡ Event Propagation - Stop event flow when needed

Installation

pip install whistle

Requires Python 3.10 or later. No dependencies.

Quick Start

Create an event dispatcher:

from whistle import EventDispatcher

dispatcher = EventDispatcher()

Add a listener to react to events

def on_spectacle_starts(event):
    print('Please turn down your phones!')

dispatcher.add_listener('spectacle.starts', on_spectacle_starts)</code></pre>

Dispatch!

dispatcher.dispatch('spectacle.starts')

Documentation

For complete documentation, visit https://python-whistle.readthedocs.io/

Release files for whistle 2.1.4

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

Source distribution (sdist)

Source distribution for whistle 2.1.4
File Size Uploaded
whistle-2.1.4.tar.gz 161.1 kB Details

Built distribution (wheel)

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

Total release size: 177.3 kB

Release files / whistle-2.1.4.tar.gz

Download URL whistle-2.1.4.tar.gz
Size 161.1 kB
Tags Source
SHA-256 checksum
How to use checksums
15fb4c9d46d32e658472da475697cb2573768a19579f1d139606fe1de5285fee
BLAKE2b-256 checksum
How to use checksums
22625e2357cb0b02d5323094d0010892295bfe7eb745e5588ee15ddcddee8c72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2025.

Transparency log

Release files / whistle-2.1.4-py3-none-any.whl

Download URL whistle-2.1.4-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc9ecb230380caa64e52174091de7d16eacd0425bd8967410aa266c87bcd5b6b
BLAKE2b-256 checksum
How to use checksums
c24f66cbfef4a8502ff627f628ffd8c5dbfddb06dcd4fedefd0112c6beb0bbff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2025.

Transparency log
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