Install & Compatibility
Where this runs
tested against v1.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.036s · 17.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.032s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Signal
✓ from blinker import Signal
Ensure correct import path to avoid ImportError.
This example demonstrates how to create a signal, connect a receiver function, and send the signal in Blinker.
import os
from blinker import Signal
# Create a new signal
my_signal = Signal('my_signal')
# Define a receiver function
def my_receiver(sender):
print(f'Received signal from {sender}')
# Connect the receiver to the signal
my_signal.connect(my_receiver)
# Send the signal
my_signal.send('SenderName')
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'blinker._saferef'
The 'blinker._saferef' module was removed in Blinker version 1.8.0, causing compatibility issues with packages like 'selenium-wire' that depend on it.
fixDowngrade Blinker to version 1.7.0 by running: 'pip install blinker==1.7.0'.
ImportError: cannot import name 'signal' from 'blinker'
The 'signal' module is not directly importable from 'blinker'; it should be accessed via 'blinker.signal'.
fixCorrect the import statement to: 'from blinker import signal'.
AttributeError: module 'blinker' has no attribute 'Signal'
The 'Signal' class should be accessed using lowercase 'signal' in Blinker.
fixUse 'from blinker import signal' and then 'my_signal = signal('my-signal')'. ImportError: No module named blinker
The `blinker` library is not installed in the Python environment, or the Python interpreter cannot find the installed package.
fixInstall the `blinker` library using pip: `pip install blinker`
AttributeError: '_FakeSignal' object has no attribute 'connect_via'
This error typically arises when a library (like `Flask-Security`) expects `blinker` to be installed and provides full signal functionality, but `blinker` is missing, causing the library to use a fallback `_FakeSignal` class without the expected `connect_via` attribute.
fixInstall the `blinker` library: `pip install blinker`
Upgrade
Version history
1.9.0latest on PyPI · released Nov 8, 2024
Audit
Dependencies
typing-extensionsoptionalProvides support for type annotations in Python versions prior to 3.9