Registry / http-networking / aiosignal

aiosignal

JSON →
library1.4.0pypypi✓ verified 49d ago

aiosignal is a Python library designed to manage asynchronous callbacks in asyncio projects. The current version is 1.4.0, released on July 3, 2025. The library has a moderate release cadence, with updates typically occurring annually.

http-networkingweb-framework
pip install aiosignal
Install & Compatibility
Where this runs
tested against v1.4.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.925 runs
installs and imports cleanly · install 0.0s · import 0.037s · 18.7MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 1.7s · import 0.032s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Signal
from aiosignal import Signal
from aiosignal.signal import Signal
The correct import is directly from the aiosignal package; importing from submodules is incorrect.

This example demonstrates creating a Signal, registering a callback, freezing the signal, and sending data to the callback.

import asyncio from aiosignal import Signal async def callback(data): print(f'Received data: {data}') async def main(): signal = Signal(owner=None) signal.append(callback) signal.freeze() await signal.send('Hello, World!') asyncio.run(main())
Debug
Known issues
breakingDropped support for Python 3.7 and 3.8.
fix
Upgrade your Python environment to version 3.9 or newer.
affects: 1.3.2 and later
gotchaOnce a Signal is frozen, adding or removing callbacks is forbidden.
fix
Ensure all necessary callbacks are added before calling freeze().
affects: All versions
gotchaCallbacks must be asynchronous functions.
fix
Define callbacks using async def.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aiosignal'
The 'aiosignal' package is not installed in the Python environment.
fix
pip install aiosignal
ImportError: cannot import name 'Signal' from 'aiosignal'
The 'Signal' class is not found in the 'aiosignal' module, possibly due to an incorrect import statement or version mismatch.
fix
from aiosignal import Signal
TypeError: 'Signal' object is not callable
Attempting to call a 'Signal' object as a function, which is not supported.
fix
Use 'await signal.send(data)' to trigger callbacks.
AttributeError: 'Signal' object has no attribute 'append'
Trying to use list methods like 'append' on a 'Signal' object, which does not support them.
fix
Use 'signal.connect(callback)' to add callbacks.
RuntimeError: Cannot modify frozen signal
Attempting to modify a 'Signal' object after it has been frozen.
fix
Ensure modifications are made before calling 'signal.freeze()'.
Upgrade
Version history
1.4.0latest on PyPI
Audit
Dependencies
frozenlistrequiredRequired for managing immutable lists
typing-extensionsoptionalNeeded for enhanced type hinting in Python versions below 3.13
Agent activity
88 hits · last 30 days
node
14
seranking-bot
4
petalbot
2
ahrefsbot
2
sogoubot
1
amazonbot
1
Resources