DependaMan - Python Dependency Analyzer

πŸ”— View on Codeberg

A command-line tool and Python library that analyzes a project’s internal module structure and produces an interactive HTML graph. It surfaces architectural problems β€” circular imports, dead code, coupling hotspots β€” using nothing but the Python standard library.

Why This Project?

As Python projects grow, their import graphs become impossible to reason about mentally. Linters catch syntax errors; type checkers catch type errors β€” but nothing tells you that your utils.py is imported by 40 modules and changed 200 times in the last year. DependaMan makes that visible.

Usage

Installation:

pip install dependaman

CLI:

dependaman                  # analyze current directory
dependaman /path/to/project # analyze a specific project

Python API:

from dependaman import dependaman

html = dependaman(".", in_memory=True)  # returns HTML string (e.g. for FastAPI)
dependaman(".")                         # writes output.html and opens in browser

Live Demo

Click nodes to inspect module details β€” functions, classes, dead callables, fan-in/out. Search by module or function name (/). Drag to reposition. Scroll to zoom. Desktop only β€” the graph requires a mouse to navigate.