pyan3
Generate approximate call graphs for Python programs
Decision gist · record as of 2026-08-14
Yes, if you need static call-graph visualization or dependency analysis. The package is actively maintained, supports current Python versions, has low install friction, and offers both CLI and API modes. The copyleft GPL-2.0-or-later license is a consideration only if you plan to redistribute derivative code commercially. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- GraphViz must be installed separately to render DOT output to SVG/PNG.
- Low install friction with a single runtime dependency (jinja2).
License · maintenance · safety
GPL-2.0-or-later (copyleft) — Licensed under GPL-2.0-or-later (copyleft). You may use and modify the package freely, but any derivative work distributed must also be open-source under a compatible GPL license.
last release 2026-07-14 (31 days) · last repo commit 2026-08-03 · 445 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 204,166 downloads/mo, #9,615 on PyPI
Alternatives
Verify before relying
pip install pyan3
pyan3 src/ --dot --colored --no-defines --concentrate --file output.dot
dot -Tsvg output.dot -o output.svg- Whether the 200+ test suite and 91% branch coverage claim applies to the current 2.6.2 release or is aspirational.
- Performance characteristics on large codebases (e.g., thousands of files or deeply nested packages).
- Accuracy of static analysis for dynamic imports, eval, or __import__ patterns.
What it is and what it does
Pyan3 reads Python source files and builds a directed graph of how functions, classes, and modules relate to each other through calls and definitions. Unlike runtime profilers, it performs static analysis by examining code structure rather than executing it, making it useful for understanding architecture without running the code. The tool outputs graphs in multiple formats—GraphViz DOT, yEd, SVG, HTML, or plain text—and supports filtering by depth, direction, and import cycles. It also performs module-level dependency analysis to detect circular imports.
The package was recently revived in February 2026 with support for modern Python syntax (walrus operators, match statements, async with, type aliases) across Python 3.10–3.14. It includes a comprehensive test suite and offers both a command-line interface and a Python API for programmatic use. The single runtime dependency is jinja2, keeping the install footprint minimal.
Use it for
- Visualize call graphs for code review or documentation by generating SVG diagrams of function relationships.
- Detect circular import dependencies at the module level to identify architectural problems.
- Generate plain-text call graphs to feed into coding AI agents or documentation systems.
- Analyze codebase structure without executing it, useful for security audits or understanding unfamiliar projects.
- Control graph detail with depth filtering to create high-level architecture overviews or drill down to specific functions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need static call-graph visualization or dependency analysis.
The package is actively maintained, supports current Python versions, has low install friction, and offers both CLI and API modes. The copyleft GPL-2.0-or-later license is a consideration only if you plan to redistribute derivative code commercially. No known vulnerabilities.
Install
pyan3 on PyPI
Before you install
Low install friction with a single runtime dependency (jinja2). The project is actively maintained as of February 2026, recently revived with modernized analyzer and comprehensive test coverage, supporting Python 3.10–3.14.
Requires Python 3.10 or later. GraphViz must be installed separately to render DOT output to SVG/PNG.
License in practice
Licensed under GPL-2.0-or-later (copyleft). You may use and modify the package freely, but any derivative work distributed must also be open-source under a compatible GPL license.
Quickstart
pip install pyan3
pyan3 src/ --dot --colored --no-defines --concentrate --file output.dot
dot -Tsvg output.dot -o output.svg
Verify before relying
- Whether the 200+ test suite and 91% branch coverage claim applies to the current 2.6.2 release or is aspirational.
- Performance characteristics on large codebases (e.g., thousands of files or deeply nested packages).
- Accuracy of static analysis for dynamic imports, eval, or __import__ patterns.
Package facts
| License | GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagejinja2 |
| Maintenance | Actively maintained 31 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 204,166 / month, #9,615 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: pyan3-2.6.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “call graph generator python”
- pyan3Pyan3 performs static analysis on Python source code to generate call…
- memrayMemray is a memory profiler for Python that traces every function…
- graphvizGenerates DOT language source code for graph structures and renders…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also import-deps · pydeps · graphviz · objgraph · modulegraph · pygraphviz · ipydagred3 · pydot-ng · GvGen · grimp