Skip to main content

Real-time visualization and diagnostics for Python asyncio applications.

Project description

AsyncViz

Visual debugging for Python asyncio applications.

Debugging asyncio is hard.

Tasks appear and disappear. Queues silently fill up. Blocking operations freeze the event loop. Dependencies become impossible to follow.

Most of the time, you're left staring at logs and trying to guess what happened.

AsyncViz makes asyncio visible.

Run your application and instantly see what it is doing in real time—tasks, queues, semaphores, executors, and await relationships, all visualized in your browser.

  • Task lifecycle visualization
  • Dependency tracking
  • Queue observability
  • Executor monitoring
  • Blocking detection
  • Runtime recording and replay
pip install asyncviz

asyncviz run app.py

AsyncViz demo


Why AsyncViz?

Traditional debugging tools tell you what happened.

AsyncViz shows you what is happening.

Instead of reading logs and stack traces, you can watch tasks being created, scheduled, executed, blocked, cancelled, and completed as your application runs.

Whether you're learning asyncio, debugging production issues, or teaching asynchronous programming, AsyncViz provides visibility that Python developers typically don't have.


Features

Realtime Task Visualization

See task creation, execution, completion, cancellation, and scheduling activity as it happens.

Track how work moves through your application in real time.


Dependency Graphs

Understand task relationships and execution flow.

Visualize:

  • Parent-child task trees
  • Gather fan-outs
  • Dependency chains
  • Runtime relationships

Dependencies page


Queue Observability

Monitor queue behavior and pressure.

Track:

  • Queue occupancy
  • Queue saturation
  • Producer activity
  • Consumer activity
  • Backpressure patterns

Blocking Detection

Find operations that freeze the event loop.

AsyncViz detects:

  • Event-loop stalls
  • Blocking calls
  • Freeze windows
  • Runtime slowdowns

and highlights them directly inside the dashboard.


Executor Monitoring

Observe:

  • ThreadPoolExecutor activity
  • ProcessPoolExecutor activity
  • Queue depth
  • Utilization
  • Failures
  • Slow jobs

Timeline View

Explore application execution through an interactive timeline.

Visualize:

  • Task creation
  • Task execution
  • Completion
  • Cancellation
  • Blocking regions

Supports:

  • Zoom
  • Pan
  • Virtualized rendering
  • Large runtime sessions

Timeline view


Runtime Recording & Replay

Capture a session and step through it later inside the dashboard.

asyncviz record app.py
asyncviz replay session-<timestamp>.avz

asyncviz record writes a portable .avz bundle containing every event from the run. asyncviz replay opens the same dashboard against that bundle, with playback controls, a lane-based timeline, scrubbing, bookmarks, and selection statistics — so the captured session can be inspected and shared without rerunning the application.

Replay page


Installation

Requirements:

  • Python 3.12+

Install from PyPI:

pip install asyncviz

Quick Start

Run any asyncio script through the CLI:

asyncviz run app.py

…or call AsyncViz from your own code with a single function:

import asyncviz

asyncviz.start()

Either path opens the dashboard at http://127.0.0.1:8877 and streams live runtime activity into it.

A complete, runnable example lives under examples/basic/ — start there to see every dashboard page come to life.


Dashboard

AsyncViz includes a built-in dashboard with dedicated views for different aspects of runtime behavior.

Overview

High-level runtime activity and health.

Overview page

Timeline

Task execution over time.

Warnings

Blocking operations and runtime issues.

Queues

Queue activity and pressure.

Semaphores

Permit usage, waiters, and contention.

Dependencies

Task relationships and execution graphs.

Executors

Executor activity and performance.

Metrics

Aggregate throughput, event rates, task counts, and runtime statistics.

Replay

Playback of recorded sessions, with scrubbing, bookmarks, and selection statistics.

Diagnostics

Findings, recommendations, and per-subsystem health, explained in plain language.

Diagnostics page


Architecture

AsyncViz consists of:

  • Runtime instrumentation
  • Live event streaming
  • Embedded web dashboard
  • Recording engine
  • Replay engine

The dashboard connects to the running application through a live event stream and updates continuously as execution progresses.


Use Cases

Learning Asyncio

Understand how tasks are scheduled and executed.

Teaching Asyncio

Demonstrate runtime behavior visually.

Debugging

Identify bottlenecks, blocking operations, and execution issues.

Performance Analysis

Inspect runtime behavior and execution flow.

Development

Gain visibility into asynchronous systems during local development.


Roadmap

Future work being considered for upcoming releases:

  • Historical comparison between sessions
  • Advanced filtering across pages
  • Broader search capabilities
  • Export of dashboard views and recordings
  • Enhanced analytics on captured sessions

Contributing

Contributions are welcome.

Bug reports, feature requests, documentation improvements, and pull requests are all appreciated.

See CONTRIBUTING.md for development guidelines.


License

MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncviz-0.1.0.tar.gz (982.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asyncviz-0.1.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file asyncviz-0.1.0.tar.gz.

File metadata

  • Download URL: asyncviz-0.1.0.tar.gz
  • Upload date:
  • Size: 982.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for asyncviz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c8f651e3fd89bbef6cac57387fb9045da7865ddff3d2bda52810bf7ef3f1eb4
MD5 704cc9cd26ffc6a6a4d02c1d0580d18d
BLAKE2b-256 f99d5ed219cc23c404e5fdaec62fb4270202d1aa3e1592dae03fa134b897a265

See more details on using hashes here.

File details

Details for the file asyncviz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: asyncviz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for asyncviz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad8361b3437cef0cfcafbc3b69c0f3cac00f08412055c0bf6659e86839c1e38d
MD5 b07474c51d64ec3518ddc5ec0ef312b6
BLAKE2b-256 10c774ce3e756e3fd8a780433b8c244348380deb0ba8da03b585ba0b529c178a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page