Skip to content


Psygnal (pronounced "signal") is a pure python implementation of Qt-style Signals with (optional) signature and type checking, and support for threading.


This library does not require or use Qt in any way. It simply implements the observer pattern: inter-object communication with loose coupling.

Performance is a high priority, as signals are often emitted frequently, benchmarks are routinely measured. Code is compiled using mypyc.


To run psygnal without using the compiled code, set an PSYGNAL_UNCOMPILED environment variable to 1. (You can also just delete the .so files in the psygnal folder).


A very simple example:

# import psygnal.Signal
from psygnal import Signal

class MyObject:
    # define one or signals as class attributes
    value_changed = Signal(str)
    shutting_down = Signal()

# create an instance
my_obj = MyObject()

# You (or others) can connect callbacks to your signals
def on_change(new_value: str):
    print(f"The value changed to {new_value}!")

# you emit signals when appropriate (e.g. when the value changes)

Please see the Basic Usage guide for an overview on how to use psygnal, or the API Reference for details on a specific class or method.

In addition to the Signal object, psygnal contains:


from pip:

pip install psygnal

from conda:

conda install -c conda-forge psygnal