Registry / communication / blinker

blinker

JSON →
library1.9.0pypypi✓ verified 25d ago

Blinker is a fast and simple object-to-object and broadcast signaling library for Python, currently at version 1.9.0. It is actively maintained with a release cadence of approximately one to two months between major versions.

pip install blinker
INSTALL
IMPORT
SIG · BLINKER
B
blinker
communicationpythonv1.9.0
Install
1.6s avg
Import
34ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.036s · 17.8MB
glibc
py 3.103.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')
Debug
Known issues
breakingSupport for Python 3.8 has been dropped in version 1.9.0.
fix
Upgrade to Python 3.9 or later.
affects: >=1.9.0
deprecatedThe `__version__` attribute has been removed in version 1.9.0.
fix
Use `importlib.metadata.version('blinker')` to retrieve the version.
affects: >=1.9.0
deprecatedThe `WeakNamespace` class has been removed in version 1.9.0.
fix
Refactor code to avoid using `WeakNamespace`.
affects: >=1.9.0
deprecatedThe `Signal.temporarily_connected_to` context manager has been removed in version 1.9.0.
fix
Use alternative methods to temporarily connect signals.
affects: >=1.9.0
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.
fix
Downgrade 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'.
fix
Correct 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.
fix
Use '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.
fix
Install 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.
fix
Install 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
Agent activity
43 hits · last 30 days
node
38
OpenAI (training)
1
Resources
blinker — pip install blinker · libregistry