Skip to main content

Interactive Python call tree visualizer — upload a project, explore its call graph in the browser

Project description

VizzPy

Interactive Python call tree visualizer. Upload a Python project and explore its function call graph in the browser. Here are some usecases:

  • Bake the headless mode in your CI pipeline for adding auto-generated call tree in your repo (auto-documentation helping in understaanding the functionality and its implementation)
  • Use in interactive mode to explore and understand the implementation of a particular functionality. This can also be helpful ahead of code reviews.

Features

  • Interactive web UI — zoom, pan, drag nodes, collapse subtrees
  • Cross-module resolution — follows imports across files to draw edges between modules
  • Dark mode — toggle with one click
  • Headless mode — render a static SVG or Mermaid flowchart from the command line (SVG requires Graphviz)
  • Zip upload — drag-and-drop a .zip or .tar.gz (or add a local folder in headless mode)

Installation

Install only what you need:

Goal Command
Mermaid headless (CI-friendly, zero extra deps) pip install vizzpy
SVG headless pip install 'vizzpy[svg]'
Interactive web UI pip install 'vizzpy[serve]'
Everything pip install 'vizzpy[all]'

SVG rendering additionally requires the Graphviz system package:

# macOS
brew install graphviz

# Debian/Ubuntu
apt install graphviz

Usage

Web UI (recommended)

vizzpy --serve
# open http://127.0.0.1:8000

Upload a .zip of your Python project or select a local folder, then click Analyze.

  • Scroll / pinch to zoom
  • Drag background to pan
  • Drag nodes to rearrange
  • Double-click a node to collapse/expand its call subtree
  • Hover a node to see its docstring

Headless rendering

# SVG (default) — requires Graphviz
vizzpy --headless ./myproject
vizzpy --headless ./myproject --output call_tree.svg

# Mermaid markdown — no extra dependencies
vizzpy --headless ./myproject --format mermaid
vizzpy --headless ./myproject --format mermaid --output call_tree.md

Options

vizzpy --serve   [--host HOST] [--port PORT]
vizzpy --headless PROJECT_PATH [--format svg|mermaid] [--output OUTPUT]

How it works

VizPy uses Python's ast module to do a two-pass analysis of your source files:

  1. Scope pass — collects every top-level function and class method with its qualified name (module.ClassName.method)
  2. Edge pass — walks each file again, resolves self.method(), cls.method(), imported names, and direct calls to project-internal functions

Results are rendered in the browser with dagre-d3 (vendored, works offline). Calls to explicitly imported library functions (e.g. pandas.read_csv) are shown as external leaf nodes — their internals are not traced.

Development

git clone https://github.com/atulsaurav/vizzpy
cd vizzpy
pip install -e ".[dev]"

# run tests
pytest

# run with coverage
pytest --cov=vizzpy --cov-report=term-missing

License

MIT

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

vizzpy-0.5.0.tar.gz (293.4 kB view details)

Uploaded Source

Built Distribution

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

vizzpy-0.5.0-py3-none-any.whl (289.8 kB view details)

Uploaded Python 3

File details

Details for the file vizzpy-0.5.0.tar.gz.

File metadata

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

File hashes

Hashes for vizzpy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 eddd34134c4caffde301f6bc07ae196bc7453b7f1efb55b9ddd1bb72b6bf0f61
MD5 5b346c80614a7a64ced0a186c0136c1d
BLAKE2b-256 3b43ebbea72ec6d5d3083b953b3d3bebccaa3d7182991f4c8433b7930d6009fd

See more details on using hashes here.

File details

Details for the file vizzpy-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: vizzpy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 289.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vizzpy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45d3e94fc3c21c4aae37a7fc238f5f8cf80be26eeaf7899f6b798c354c4a8e77
MD5 17c590a4514e2cebbe8df889e1b1f01c
BLAKE2b-256 f252c9a62b0abc349ba7fed1d870692c359261eda43dd9e3b666cb45e9540161

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