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/api.md DigDep 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.1.0.tar.gz (11.3 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.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for digdep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72728d879e32f8e2479486591847289d516b463a98593ed7ca14e06c1d2fa5c7
MD5 872374d352ea711e23ead6419c9cef30
BLAKE2b-256 defe0b4a057cd9529755564d5f5c35436d43abbed9d471089dadbcf34170e415

See more details on using hashes here.

File details

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

File metadata

  • Download URL: digdep-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 959bc07a4f72cf67b03d97288e83f482fe4180d0205859a70d08f21854b230bd
MD5 561ddb802b0cb08b37b71f631c936c33
BLAKE2b-256 e3271be5ed141d1a4cc8c006c9bb067993163f394486e86bc5708ff6e051c9d9

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