Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigDep

Version PyPI version Python versions License Status Open Source

A lightweight Python dependency analyzer that scans Python projects and visualizes import relationships.


Features

  • 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

Installation

pip install digdep

Quick Start

Command Line

List project dependencies.

digdep deps ./myproject

Show the File → Dependency tree.

digdep file-tree ./myproject

Show the Dependency → File tree.

digdep dep-tree ./myproject

Show unused imports.

digdep unused-imports ./myproject

For the complete CLI reference, see:

📖 CLI Documentation


Python Library

from digdep import DepAnalyzer

analyzer = DepAnalyzer()
analyzer.analyze("./myproject")

analyzer.show_deps()

For the complete Python API guide, see:

📖 Python Library Documentation


Example Output

File → Dependency Tree

Root (/projects/example)

├── main.py              → requests, pathlib
├── config.py            → json
│
├── modules/
│   ├── logger.py        → logging
│   ├── parser.py        → re, typing
│
└── utils/
    └── helpers.py       → functools

Documentation

Guide Description
README Installation and quick start
docs/cli.md Complete command-line reference
docs/api.md DigDep library guide

Roadmap

  • Circular dependency detection
  • Multiple output formats
  • Performance improvements

Requirements

  • Python 3.11+

License

Released under the MIT License.

Releases

Packages

Contributors

Languages