psygnal
Fast python callback/event system modeled after Qt Signals
What it is and what it does
Psygnal is a pure Python event system that lets you define signals on objects and connect callback functions to them. When a signal is emitted, all connected callbacks are invoked with the signal's arguments. It mimics Qt's signals-and-slots API but requires no Qt dependency, and includes optional runtime type checking to catch mismatched callback signatures.
The library also provides higher-level conveniences: an @evented decorator that automatically emits signals when dataclass fields change (compatible with standard dataclasses, attrs, and pydantic), and evented container types (EventedList, EventedDict, EventedSet) that emit signals on mutation. It has no external dependencies and is compiled with mypyc for performance, though a pure Python fallback is available.
Use it for:
- Build reactive UIs or data models where UI components need to respond to state changes without tight coupling.
- Create plugin systems where plugins register callbacks to be notified of application events.
- Monitor mutations to data structures (lists, dicts, sets) and trigger side effects like logging or validation.
- Implement evented dataclasses that automatically notify listeners when fields are modified.
- Coordinate multi-threaded applications where one thread needs to signal completion or state changes to others.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Psygnal implements the observer pattern with a Qt-style signals API, allowing objects to emit events that connected callbacks can listen to, with optional type checking and threading support.
Yes. Psygnal is production-stable, dependency-free, actively maintained, and solves a common architectural need (decoupled event notification) with a clean, familiar API. The zero-dependency design and low install friction make it a safe choice for projects of any size. No known security issues.
Install
psygnal on PyPI
pip
pip install psygnaluv
uv add psygnalpoetry
poetry add psygnalInstalling psygnal
Before you install
Low friction: pure Python wheel with zero runtime dependencies, actively maintained with recent commits, and supports current Python versions (3.10–3.14).
License in practice
BSD 3-Clause is permissive; you may use, modify, and distribute psygnal freely in commercial and private projects with minimal restrictions.
Quickstart
from psygnal import Signal
class MyObject:
value_changed = Signal(str)
my_obj = MyObject()
@my_obj.value_changed.connect
def on_change(new_value: str):
print(f"Value: {new_value}")
my_obj.value_changed.emit('hello')
Verify before relying
- Whether the optional mypyc compilation is automatically applied in wheel distributions or requires manual build setup.
- Performance overhead of type checking relative to untyped signal emission.
- Thread-safety guarantees and behavior when signals are emitted from multiple threads concurrently.
Package facts
| License | BSD 3-Clause License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 222 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,126,967/month — #2,376 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: psygnal-0.15.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
blinkerBlinker provides a lightweight event…
permissive · top 1,000 on PyPI
EventsProvides a publish-subscribe event system where…
permissive · top 1,000 on PyPI
PypubsubProvides a publish-subscribe messaging system…
permissive · top 15,000 on PyPI
aiosignalProvides a Signal class for managing lists of…
permissive · top 100 on PyPI
PyDispatcherPyDispatcher implements a signal-dispatch…
permissive · top 5,000 on PyPI
observableObservable provides a lightweight event system…
permissive · top 15,000 on PyPI
pyventusPyventus is a Python library for building…
permissive · top 15,000 on PyPI
cysignalsProvides interrupt and signal handling…
copyleft · top 15,000 on PyPI
pymitterAn event emitter library that lets you register…
permissive · top 15,000 on PyPI
pysigsetProvides Python access to POSIX signal masking…
copyleft · top 15,000 on PyPI