A lightweight Python dependency analyzer that scans Python projects and visualizes import relationships.
- Scan Python projects for imported modules
- List project dependencies
- Generate File → Dependency trees
- Generate Dependency → File trees
- Detect unused imports
- Filter dependencies by type (Standard Library, Third-party, Local)
- Export results as JSON
- Use from the command line or as a Python library
pip install digdepList project dependencies.
digdep deps ./myprojectShow the File → Dependency tree.
digdep file-tree ./myprojectShow the Dependency → File tree.
digdep dep-tree ./myprojectShow unused imports.
digdep unused-imports ./myprojectFor the complete CLI reference, see:
from digdep import DepAnalyzer
analyzer = DepAnalyzer()
analyzer.analyze("./myproject")
analyzer.show_deps()For the complete Python API guide, see:
📖 Python Library Documentation
Root (/projects/example)
├── main.py → requests, pathlib
├── config.py → json
│
├── modules/
│ ├── logger.py → logging
│ ├── parser.py → re, typing
│
└── utils/
└── helpers.py → functools
| Guide | Description |
|---|---|
| README | Installation and quick start |
| docs/cli.md | Complete command-line reference |
| docs/api.md | DigDep library guide |
- Circular dependency detection
- Multiple output formats
- Performance improvements
- Python 3.11+
Released under the MIT License.