Skip to content
A tiny library for monitoring and testing asyncio programs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
aiodebug review fixes Dec 15, 2016
docs v1.1.0 Nov 28, 2016
.python-version v1.1.0 Nov 28, 2016
LICENSE Add Apache license notice and add missing files to Nov 28, 2016
README.rst Hotlink the lags screenshot from github so that it displays on PyPI. Nov 28, 2016
requirements.txt review changes Dec 15, 2016



This is a tiny library for monitoring and testing asyncio programs. Its monitoring features are meant to be always on in production.

Aiodebug will use logwood if it is installed, otherwise it will default to the standard logging module.

Aiodebug is only tested with Python 3.5. There are no plans to support older versions.

Log warnings when callbacks block the event loop


This will produce WARNING-level logs such as

Executing <Task pending coro=<foo() running at /home/.../>
wait_for=<Future pending cb=[Task._wakeup()]>> took 0.069 seconds

Asyncio already does this in debug mode, but you probably don't want to enable full-on debug mode in production.

Track event loop lags in StatsD


Tracks how much scheduled calls get delayed and sends the lags to StatsD:

Speed up or slow down time in the event loop

This is mainly useful for testing.

loop = aiodebug.testing.time_dilated_loop.TimeDilatedLoop()

loop.time_dilation = 3
await asyncio.sleep(1) # Takes 0.333s of real time

loop.time_dilation = 0.1
await asyncio.sleep(1) # Takes 10s of real time
You can’t perform that action at this time.