Skip to main content

🧶 deptangle

The lightning-fast, visual dependency detective that untangles and fixes your Python environments.

CI License: MIT Python 3.9+

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 or eval'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 — suggest only 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

Metadata

Release files for deptangle 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deptangle 0.1.2
File Size Uploaded Provenance Actions
deptangle-0.1.2.tar.gz 22.0 kB With provenance Details for deptangle-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for deptangle 0.1.2
File Interpreter ABI Platform Actions
deptangle-0.1.2-py3-none-any.whl Python 3 none any Details for deptangle-0.1.2-py3-none-any.whl

Total release size: 48.1 kB

Release files / deptangle-0.1.2.tar.gz

Download URL deptangle-0.1.2.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4eb612a5ce129926618612451c2a25eb71324b5992e5eed4b2fd5ac287cff237
BLAKE2b-256 checksum
How to use checksums
db152ed4ce21c29ae3a038d70a220094818351658491a4162c3d9a295c5f951a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Release files / deptangle-0.1.2-py3-none-any.whl

Download URL deptangle-0.1.2-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b17956aed61dcd389c79a45a457fe065d2d1042f4acc7a6f7443c4031803ded
BLAKE2b-256 checksum
How to use checksums
dc8381487b3f124815867930577c668b5af292d36fa300b7a8ef1aaf5c5f3cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

Security for deptangle 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for deptangle-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page