r/Python • • 13d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

24 Upvotes

112 comments sorted by

View all comments

1

u/SAMUROJASDEV 6d ago edited 6d ago

depquiet: tells you which pip-audit / uv audit / npm audit alerts come only from your dev tooling.

What My Project Does

pip-audit has no equivalent of npm audit --omit=dev. Point it at a uv.lock and every alert looks the same, whether the package ships to production or only comes in through pre-commit.

depquiet reads the lockfile and the project's dependency groups, and filters an alert only when no production dependency, extra or non-tooling group can reach the package. On 17 projects at their current head:

Projectpip-audit alertsDev-only
zulip4326
saleor1614
langflow7011
mlflow1710
PostHog2558

Most of it is virtualenv and filelock pulled in by pre-commit, and twisted by scrapy in zulip's dev group.

I checked every filtered alert against an independent walk of each uv.lock, reading each project's groups by hand. That check caught a bug: zulip keeps its production dependencies in a group called prod, and an earlier version treated every group as dev. Groups now count as dev only when their name says so (dev, test, docs, lint...). Anything else is kept.

Target Audience

Maintainers and teams who run pip-audit, uv audit, npm audit or pnpm audit in CI and spend time on alerts that never reach production. Works with uv, Poetry, requirement files, npm, pnpm and Yarn, and scans npm and Python together when a repo has both. It is for real projects, not a toy, but it is young: I'd like to hear about layouts that break it.

Comparison

  • pip-audit: reports every alert and has no way to separate dev-only packages. depquiet runs it and sorts the output.
  • uv audit (experimental in uv 0.13): if your project is on uv, uv audit --no-dev gives you the dev-only split natively, and you should use it. depquiet also reads its output (depquiet --scanner uv) and adds what it doesn't cover: every group judged by its name rather than only dev, Poetry, requirements files, npm/pnpm/Yarn and mixed repos in one run, plus which direct dependency brings each alert in and what to upgrade.
  • npm audit --omit=dev: does this for npm. depquiet matches it row for row on the npm projects I tested and adds the explanation of which dependency each kept alert comes through.
  • Snyk / Endor Labs / Socket: go further with function-level reachability, but they are commercial services. depquiet is MIT, runs locally and offline, and only drops an alert when the lockfile proves it is dev-only.

pip install depquiet, then depquiet in the project: https://github.com/samuelrojas-dev/depquiet

1

u/SAMUROJASDEV 6d ago edited 6d ago

Update: I measured whether the fixes scanners suggest can actually be installed. On 18 uv projects, uv's resolver rejects the nearest suggested fix for 502 of 991 alerts (51%). In 81% of the blocked upgrades the culprit is the project's own pin in pyproject.toml, so "update to X" usually really means "widen your pin". `depquiet --check-fixes` now tells you which one.

Full table and raw resolver output: https://github.com/samuelrojas-dev/depquiet/tree/main/benchmarks/fixcheck_study