aiodebug
A tiny library for monitoring and testing asyncio programs
What it is and what it does
aiodebug is a small library for observing and testing asyncio event loops. It provides four main tools: log_slow_callbacks warns when tasks block the event loop beyond a threshold, monitor_loop_lag tracks scheduling delays and sends them to StatsD, hang_inspection dumps stack traces when the event loop stalls, and TimeDilatedLoop speeds up or slows down time for testing. The library is designed to run in production with minimal overhead, though it can also be used for development and testing.
The package depends only on typing-extensions and optionally uses logwood for structured logging if available, falling back to Python's standard logging. It supports Python 3.8, 3.9, and 3.10 but has not been maintained since 2022-01-04, meaning it may not work correctly with newer Python releases or asyncio behavior changes.
Use it for:
- Detect and log when asyncio tasks block the event loop beyond a threshold in production.
- Track event loop scheduling lag and send metrics to StatsD for monitoring system responsiveness.
- Diagnose which thread is blocking the event loop by dumping stack traces when hangs occur.
- Speed up or slow down time in event loops during unit tests to verify timeout and delay behavior.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
aiodebug provides monitoring and testing utilities for asyncio programs, including event loop lag tracking, slow callback detection, hang inspection, and time manipulation for tests.
No. While the library is lightweight and addresses real asyncio debugging needs, it is abandoned (last release 2022-01-04) with no active maintenance. Given the rapid evolution of Python and asyncio since then, compatibility with current Python versions is uncertain. Use only if you are already running an older codebase that depends on it; for new projects, seek actively maintained alternatives.
Install
aiodebug on PyPI
pip
pip install aiodebuguv
uv add aiodebugpoetry
poetry add aiodebugInstalling aiodebug
Before you install
Low install friction with a single lightweight dependency (typing-extensions). However, the package is abandoned—last release was 2022-01-04, over 1683 days ago. No active maintenance or security updates.
License in practice
Licensed under Apache 2.0 (permissive), which allows commercial and private use with minimal restrictions. No licensing concerns for adoption.
Quickstart
pip install aiodebug
import aiodebug.log_slow_callbacks
aiodebug.log_slow_callbacks.enable(0.05)
Requires Python 3.8 or higher; no support for older versions.
Verify before relying
- Whether the package works reliably with current Python 3.10+ asyncio implementations given the 1683-day gap since last release.
- Whether hang_inspection's stack trace dumping works correctly on modern Python and threading implementations.
- Compatibility with modern async frameworks that may have evolved since 2022-01-04.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | abandoned — 1,683 days since the last release |
| First released | |
| Downloads | 270,616/month — #8,232 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiodebug-2.3.0-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pyleakDetects leaked asyncio tasks, threads, and…
unclear · top 15,000 on PyPI
hud-sdkHud-sdk is a lightweight runtime sensor that…
unclear · top 15,000 on PyPI
simple-pidA dependency-free PID controller library that…
permissive · top 15,000 on PyPI
aiojobsaiojobs provides a scheduler for spawning and…
permissive · top 15,000 on PyPI
aiosignalProvides a Signal class for managing lists of…
permissive · top 100 on PyPI
aiocopDetects and logs blocking I/O and CPU calls in…
permissive · top 15,000 on PyPI
asynctestExtends Python's unittest module with test…
permissive · top 5,000 on PyPI
aiorunProvides a simplified entry point for asyncio…
permissive · top 15,000 on PyPI
aioodbcaioodbc provides async/await access to ODBC…
permissive · top 5,000 on PyPI
py-spypy-spy is a sampling profiler that attaches to…
permissive · top 1,000 on PyPI