Tool that create a graph of code to show dependencies between code entities (methods, classes and etc).
Project description
CodeGraph - static code analyzator, that create a diagram with your code structure.
Live Demo - Interactive visualization of simple-ddl-parser codebase
Tool that creates a diagram with your code structure to show dependencies between code entities (methods, modules, classes and etc). Main advantage of CodeGraph is that it does not execute the code itself. You don’t need to activate any environments or install dependencies to analyze the target code. It is based only on lexical and syntax parsing, so it doesn’t need to install all your code dependencies.
Interactive Visualization
Zoom, Pan & Drag - Use mouse wheel to zoom, drag background to pan, drag nodes to reposition them.
Search & Highlight
Search with Autocomplete - Press Ctrl+F (or Cmd+F on Mac) to search. Results show node type with color coding.
Highlight Connections - Click on any node to highlight it and all connected nodes. Others will be dimmed.
Node Information
Tooltips - Hover over any node to see details: type, parent module, full path, and connection count.
Unlinked Modules
Unlinked Panel - Shows modules with no connections. Click to navigate to them on the graph.
Massive Objects Detection
Massive Objects Panel - Find large code entities (modules, classes, functions) by lines of code. Filter by type and set custom threshold.
Display Settings
Size by Lines of Code - Toggle node size scaling based on lines of code. Larger nodes = more code.
UI Tips
Built-in Help - Legend and keyboard shortcuts are always visible in the UI.
Draggable Panels - All UI panels can be dragged and collapsed for a cleaner view.
Installation
pip install codegraph
For legacy matplotlib visualization support:
pip install codegraph[matplotlib]
Usage
codegraph /path/to/your_python_code
This will generate an interactive HTML visualization and open it in your browser.
CLI Options
Option |
Description |
|---|---|
--output PATH |
Custom output path for HTML file (default: ./codegraph.html) |
--matplotlib |
Use legacy matplotlib visualization instead of D3.js (requires codegraph[matplotlib]) |
-o, --object-only |
Print dependencies to console only, no visualization |
Changelog
See CHANGELOG.md for full version history.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codegraph-1.2.0.tar.gz.
File metadata
- Download URL: codegraph-1.2.0.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bc33d23c87a6068b26f87862743d3785ac287420d451b592556a5e569c213c0
|
|
| MD5 |
1901aedca04b01d32a64a1a75390b9bb
|
|
| BLAKE2b-256 |
1942c371fab60ca37d717624dcbc90cac28e60630086ca43f06d8feed5e2f87a
|
File details
Details for the file codegraph-1.2.0-py3-none-any.whl.
File metadata
- Download URL: codegraph-1.2.0-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8918b0211f00b40ab9dcc427ddd423928eb5cb8bde774fc9adf9196e5dedce1
|
|
| MD5 |
cc9f00d386f578c0818a6a618412d6ae
|
|
| BLAKE2b-256 |
de0661e649a79d4860cc0635186d2146ab9bb48a6e971c5d8c1aa2de2ed52124
|