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
  • Two granularity levels — toggle between function-level and module-level call graph in the UI or via --level
  • 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)
  • Archive upload — drag-and-drop a .zip, .tar.gz, .egg, or .whl in the web UI; pass a folder path 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

# or pre-load a local project — renders immediately on page open
vizzpy --serve --project ./myproject

Upload a .zip, .tar.gz, .egg, or .whl of your Python project, 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 (function view)
  • Hover a node to see its docstring
  • Function view / Module view button in the toolbar — toggle between individual function nodes and a rolled-up module-level graph

Headless rendering

# Mermaid markdown — no extra dependencies (default format)
vizzpy --headless --project ./myproject                          # → call_tree.md  (function level)
vizzpy --headless --project ./myproject --level module           # → call_tree.md  (module level)
vizzpy --headless --project ./myproject --level both             # → call_tree_functions.md + call_tree_modules.md

# SVG — requires Graphviz
vizzpy --headless --project ./myproject --format svg
vizzpy --headless --project ./myproject --format svg --level module
vizzpy --headless --project ./myproject --format svg --level both

# Custom output path
vizzpy --headless --project ./myproject --format mermaid --output graph.md

Options

vizzpy --serve   [--host HOST] [--port PORT] [--project PROJECT_PATH]
vizzpy --headless --project PROJECT_PATH [--format svg|mermaid] [--level function|module|both] [--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.6.0.tar.gz (296.9 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.6.0-py3-none-any.whl (292.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for vizzpy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 d5e76db292841b4cdb96218a2afe869b9f3f8e9148a45a4d4454d5760bf50836
MD5 b9cc95ff560284065de06e82fd4d416c
BLAKE2b-256 9d3319ca19db00e938df07bb98d248f9649be68e81c090f4ad194415e97c0375

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vizzpy-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 292.7 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00addcd38d0490185f8328f0c4cf3b4cbb2f1c6e8a37e9b5794d39054db723d6
MD5 e404f053b6516e6e25385112c3353bc5
BLAKE2b-256 0f72a7c7c1da55ca80f88954b9a7078e081c129aae04879cad8aacc8d39af430

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