skillfed

aiodebug

A tiny library for monitoring and testing asyncio programs

aiodebug v2.3.0 270.6K downloads/30d#8,232 on PyPI
Permissive license Apache 2.0 Abandoned released

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 aiodebug

uv

uv add aiodebug

poetry

poetry add aiodebug

Installing 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

License :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

asyncio debugging and monitoringevent loop performance monitoringdetect slow asyncio callbacksasyncio testing utilitiesevent loop hang detectionasyncio profiling tools
asyncio-debuggingevent-loop-monitoringabandoned

More Testing packages

Further reading