Automatically add missing dependencies found by deptry using uv.
Project description
deptry-auto
Scan a Python project with deptry and automatically add any missing runtime dependencies with uv add.
Installation
Install the package into the project you would like to manage (or into a dedicated tools environment):
uv add deptry-auto
ℹ️
deptry-autoexpectsuvto be available on yourPATH.
Usage
Run the CLI from the directory that contains the pyproject.toml, or pass the target path explicitly:
# Scan the current project and apply fixes
deptry-auto
# Scan another project from anywhere
deptry-auto path/to/other-project
# Preview the changes without modifying the project
deptry-auto --dry-run
What happens:
deptryruns with JSON output enabled (usingpython -m deptry --json-output ...).- Any issues with code
DEP001(missing dependency) are collected. - Each missing package is added to the target project with
uv add <package>.
deptry exits with code 1 when it finds issues, so deptry-auto tolerates both 0 (clean) and 1 (issues) but still halts for any other failure. Use --dry-run when you only need a report of the missing dependencies.
Development
uv sync # install dependencies
uv run deptry-auto --dry-run .
Run the CLI against a throwaway project if you want to observe uv add in action.
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 deptry_auto-0.1.0.tar.gz.
File metadata
- Download URL: deptry_auto-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
335f24ac925bb52c3447c70c08db5f26e60b5067ad77ee94c13626a1f6450a13
|
|
| MD5 |
66138a553ae74beca0e5e0d03d272f02
|
|
| BLAKE2b-256 |
7de701e68b2165287fbb75ce0fd65e3141bb660097182b8b3ea036c91bdb1c77
|
Provenance
The following attestation bundles were made for deptry_auto-0.1.0.tar.gz:
Publisher:
python-publish.yml on mwmuni/deptry-auto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deptry_auto-0.1.0.tar.gz -
Subject digest:
335f24ac925bb52c3447c70c08db5f26e60b5067ad77ee94c13626a1f6450a13 - Sigstore transparency entry: 708124394
- Sigstore integration time:
-
Permalink:
mwmuni/deptry-auto@56d0eb889d68b07a558f8ce033c6402d0bfde116 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/mwmuni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@56d0eb889d68b07a558f8ce033c6402d0bfde116 -
Trigger Event:
release
-
Statement type:
File details
Details for the file deptry_auto-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deptry_auto-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a26d7789bf1969dd75b1b0d92c5255433c1b150ba3652c9db63342d0e05285e2
|
|
| MD5 |
e50097bf06955cd7b274ed065fd2b6e9
|
|
| BLAKE2b-256 |
e19d2e57308e445b7e712beaaa267d6c93cb66602c8ff4600041cba0bbe88a2c
|
Provenance
The following attestation bundles were made for deptry_auto-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on mwmuni/deptry-auto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deptry_auto-0.1.0-py3-none-any.whl -
Subject digest:
a26d7789bf1969dd75b1b0d92c5255433c1b150ba3652c9db63342d0e05285e2 - Sigstore transparency entry: 708124403
- Sigstore integration time:
-
Permalink:
mwmuni/deptry-auto@56d0eb889d68b07a558f8ce033c6402d0bfde116 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/mwmuni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@56d0eb889d68b07a558f8ce033c6402d0bfde116 -
Trigger Event:
release
-
Statement type: