Skip to main content

A lightweight Python dependency analyzer

Project description

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/python-api.md Python library guide

Roadmap

  • Circular dependency detection
  • Multiple output formats
  • Performance improvements

Requirements

  • Python 3.11+

License

Released under the MIT License.

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

digdep-0.0.8.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digdep-0.0.8-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file digdep-0.0.8.tar.gz.

File metadata

  • Download URL: digdep-0.0.8.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for digdep-0.0.8.tar.gz
Algorithm Hash digest
SHA256 99afc888f53dec5c87c0d01c76b438a098162d209bb61c7d80fbacc2ec38234c
MD5 595fd2306805fd2f8f391e61ac412f20
BLAKE2b-256 1082c1d325d2f4a33d5d45045058839949f45779ce50e6b46f73ef850071f6f7

See more details on using hashes here.

File details

Details for the file digdep-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: digdep-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for digdep-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2398c5fbfb8f2df0b1980b26f2b10ead0af3a432d522350a18da2d1535f1b9ce
MD5 2281fdf30fa718a87b1269367be11b33
BLAKE2b-256 d6f25cecd7c66885a68b443010c04a11250218ce683b588f21e9cb4e60e06ee3

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