The lightning-fast, visual dependency detective that untangles and fixes your Python environments.
Project description
๐งถ deptangle
The lightning-fast, visual dependency detective that untangles and fixes your Python environments.
deptangle is a modern CLI that diagnoses "dependency hell" for Python
developers. It maps your dependency graph, scans for known CVEs via
OSV, flags outdated and yanked packages, and uses a
constraint solver to suggest the exact commands to fix conflicts โ powered
by uv for speed.
โจ Features
| Feature | Command | |
|---|---|---|
| ๐ฉบ | Environment diagnostics โ pinpoint the active interpreter & venv | deptangle status |
| ๐บ๏ธ | Interactive dependency graph โ health-coloured HTML network | deptangle map |
| ๐ | Security scanning โ known CVEs via the OSV database | deptangle check |
| โป๏ธ | Outdated / yanked detection โ via the PyPI JSON API | deptangle check |
| ๐ ๏ธ | Auto-fix suggestions โ constraint-solved upgrade/downgrade paths | deptangle suggest |
| ๐ฆ | Lockfile support โ uv.lock, poetry.lock, Pipfile.lock |
all commands |
๐ Install
# with uv (recommended)
uv tool install deptangle
# or with pip
pip install deptangle
๐งช Usage
# 1. Diagnose your environment
deptangle status
# 2. Visualise the dependency graph (writes an interactive HTML file)
deptangle map -o graph.html
# 3. Check for conflicts, outdated packages, and CVEs
deptangle check
deptangle check --only-issues # show only problems
deptangle check --offline # no network calls
# 4. Get actionable fix commands
deptangle suggest
# Work from a lockfile instead of the live environment
deptangle check --lockfile uv.lock
Color legend in the graph and tables: ๐ข healthy ยท ๐ก outdated ยท ๐ deprecated/yanked ยท ๐ด conflict ยท ๐ด vulnerable
๐ Security by design
deptangle reads untrusted inputs (lockfiles, package metadata, remote APIs) and
shells out to uv, so it is hardened from the ground up. See SECURITY.md.
- No code execution โ lockfiles are parsed as data (
tomllib/json); package code is never imported oreval'd. - Hardened subprocess โ
shell=False, list-args only, resolved executables, timeouts, scrubbed environment. - SSRF-resistant networking โ HTTPS-only to an explicit host allowlist (
pypi.org,api.osv.dev), redirects disabled, IP literals rejected, response size capped, timeouts enforced. - Injection-safe output โ package names/versions validated (PEP 508/440) and HTML-escaped before entering the graph; Pyvis JS served locally, not from a CDN.
- deptangle never modifies your environment โ
suggestonly prints commands for you to review and run.
๐๏ธ Architecture
src/pytangle/
โโโ cli.py # Typer commands: status, map, check, suggest
โโโ environment.py # Phase 2 โ interpreter & venv diagnostics
โโโ parser.py # Phase 3 โ dependency graph + lockfile parsing
โโโ visualizer.py # Phase 3/4 โ Pyvis interactive HTML graph
โโโ checker.py # Phase 4 โ PyPI health (outdated/yanked/deprecated)
โโโ security.py # Phase 4 โ OSV vulnerability scanning
โโโ resolver.py # Phase 5 โ constraint-solving auto-fix engine
โโโ report.py # Rich table rendering
โโโ models.py # typed data models
โโโ _safety.py # ๐ centralised security primitives
๐งโ๐ป Development
git clone https://github.com/Solanki-Prem/deptangle
cd deptangle
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
ruff check src tests # lint
mypy src # type check
pytest --cov=pytangle # tests
๐บ๏ธ Roadmap
deptangle fix --applyโ execute suggested fixes automatically (with confirmation)- A GitHub Action that fails CI when a new CVE is introduced
๐ License
MIT ยฉ Prem Solanki
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deptangle-0.1.2.tar.gz.
File metadata
- Download URL: deptangle-0.1.2.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eb612a5ce129926618612451c2a25eb71324b5992e5eed4b2fd5ac287cff237
|
|
| MD5 |
ca47e4ee5ad31e0855d47eba8c507a35
|
|
| BLAKE2b-256 |
db152ed4ce21c29ae3a038d70a220094818351658491a4162c3d9a295c5f951a
|
Provenance
The following attestation bundles were made for deptangle-0.1.2.tar.gz:
Publisher:
publish.yml on Solanki-Prem/deptangle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deptangle-0.1.2.tar.gz -
Subject digest:
4eb612a5ce129926618612451c2a25eb71324b5992e5eed4b2fd5ac287cff237 - Sigstore transparency entry: 1671627972
- Sigstore integration time:
-
Permalink:
Solanki-Prem/deptangle@446ca2269be672428383b0b413927c2cdacd8b48 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Solanki-Prem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@446ca2269be672428383b0b413927c2cdacd8b48 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deptangle-0.1.2-py3-none-any.whl.
File metadata
- Download URL: deptangle-0.1.2-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b17956aed61dcd389c79a45a457fe065d2d1042f4acc7a6f7443c4031803ded
|
|
| MD5 |
a03848b9cab7b5155722fc8a46c1ee02
|
|
| BLAKE2b-256 |
dc8381487b3f124815867930577c668b5af292d36fa300b7a8ef1aaf5c5f3cef
|
Provenance
The following attestation bundles were made for deptangle-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on Solanki-Prem/deptangle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deptangle-0.1.2-py3-none-any.whl -
Subject digest:
4b17956aed61dcd389c79a45a457fe065d2d1042f4acc7a6f7443c4031803ded - Sigstore transparency entry: 1671627998
- Sigstore integration time:
-
Permalink:
Solanki-Prem/deptangle@446ca2269be672428383b0b413927c2cdacd8b48 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Solanki-Prem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@446ca2269be672428383b0b413927c2cdacd8b48 -
Trigger Event:
release
-
Statement type: