Show why a Python package is installed by tracing its lock file dependency graph
Project description
whydep
A fast Rust CLI that answers "why is this Python package installed?" by tracing your project's lock file dependency graph and showing which source files use it.
Install
pip install whydep
# or
uv add --dev whydep
Usage
# Look up a single package
wd certifi
whydep certifi # same tool, longer alias
# Point at a different project
wd certifi --dir /path/to/my-project
# Scan all direct dependencies for unused ones
wd --find-deprecated
Example output
For a transitive dependency:
Why is 'MarkupSafe' installed?
└── jinja2
└── flask
· src/main.py:1: import flask
· src/main.py:2: from flask import Flask, request
└── (project root)
For a direct dependency:
Why is 'flask' installed?
· src/main.py:1: import flask
· src/main.py:2: from flask import Flask, request
└── (project root)
If no imports are found for a direct dependency, it is marked as removable:
Why is 'flask' installed?
· (not directly imported — may be aliased or dynamically imported)
(can be removed)
└── (project root)
Lines starting with · show where your code imports the direct dependency that pulled the package in.
--find-deprecated
Scans all direct dependencies and lists those with no imports found in your source files:
Unused direct dependencies (2):
certifi — no imports found, can be removed
idna — no imports found, can be removed
Supported lock files
| Tool | Lock file |
|---|---|
| uv | uv.lock |
| Poetry | poetry.lock |
uv.lock is preferred when both exist. The lock file is searched in the given directory and up to 3 parent directories.
Configuration
Add a [tool.whydep] section to your pyproject.toml to limit source scanning to specific directories (faster, less noise):
[tool.whydep]
src = "src" # single directory
# src = ["src", "tests"] # or multiple
Without this setting the entire project directory is scanned.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 whydep-0.1.2.tar.gz.
File metadata
- Download URL: whydep-0.1.2.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea04d029c9d5186e77314acee89274b47c58e095939e14b9b1a89cc064d2e230
|
|
| MD5 |
c7e315303df7fbb1b6caad638b76ec88
|
|
| BLAKE2b-256 |
a65dc0e787fd22fc48357e564d74056d7ebafbbc409d77f5eefdb3a0e0180a6f
|
Provenance
The following attestation bundles were made for whydep-0.1.2.tar.gz:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2.tar.gz -
Subject digest:
ea04d029c9d5186e77314acee89274b47c58e095939e14b9b1a89cc064d2e230 - Sigstore transparency entry: 1279024798
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whydep-0.1.2-py3-none-win_amd64.whl.
File metadata
- Download URL: whydep-0.1.2-py3-none-win_amd64.whl
- Upload date:
- Size: 960.0 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0fbb64a5d8500511832bf0950e6c44de000d8c2b77857e8430d1ba539ff49c7
|
|
| MD5 |
0b71cd8f3a5d343759e0f595b4ef3051
|
|
| BLAKE2b-256 |
c3ddc7d1f400a1ad20093a0626169d55ee8f0ac1d32d2f158238c523d63f89d6
|
Provenance
The following attestation bundles were made for whydep-0.1.2-py3-none-win_amd64.whl:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2-py3-none-win_amd64.whl -
Subject digest:
f0fbb64a5d8500511832bf0950e6c44de000d8c2b77857e8430d1ba539ff49c7 - Sigstore transparency entry: 1279024862
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whydep-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: whydep-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0575e4a3b6a2ed4fd00b7e56343191392c506bd368707ed113fa7989f0032322
|
|
| MD5 |
0af63119f466626ebb543728283b9334
|
|
| BLAKE2b-256 |
5eaa459cbda7849310ecd80a26699de53ef20186ce05979ebcacafdfb03f13a9
|
Provenance
The following attestation bundles were made for whydep-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0575e4a3b6a2ed4fd00b7e56343191392c506bd368707ed113fa7989f0032322 - Sigstore transparency entry: 1279024847
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whydep-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: whydep-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc3c328b86e6b5c67f7d4c67f3908b7542e70383bbfe83759a3b7ac26ef3f55e
|
|
| MD5 |
555342d99437798208d50f72dc1ffd7f
|
|
| BLAKE2b-256 |
16cd34b7d22d887982e95515d904b09d3fb88d217169e708a1e52585c129f6e2
|
Provenance
The following attestation bundles were made for whydep-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
bc3c328b86e6b5c67f7d4c67f3908b7542e70383bbfe83759a3b7ac26ef3f55e - Sigstore transparency entry: 1279024833
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whydep-0.1.2-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: whydep-0.1.2-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8f498dec55f0a086e9234c07f8cd098f2fdfc9f880d924988ab2315add1e3c3
|
|
| MD5 |
870695e78a1937ee5c89f97b85f849b8
|
|
| BLAKE2b-256 |
6b9b15cb972d22896d25206015a6d6d4c293494ce847e452f7dc78545496a46d
|
Provenance
The following attestation bundles were made for whydep-0.1.2-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2-py3-none-macosx_11_0_arm64.whl -
Subject digest:
f8f498dec55f0a086e9234c07f8cd098f2fdfc9f880d924988ab2315add1e3c3 - Sigstore transparency entry: 1279024812
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whydep-0.1.2-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: whydep-0.1.2-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11b08eeabf3a78214c7277ba5b98c14c1ab9b3212d7d33b6761526c0f461cafb
|
|
| MD5 |
2f29e351a0e8b32650ed082f02fabc9a
|
|
| BLAKE2b-256 |
0850a3e82c9b50bbaa0251012d36f80b46fdd3aba06bcf3bdac1cdedc6f63d7a
|
Provenance
The following attestation bundles were made for whydep-0.1.2-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on colour-white/whydep
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whydep-0.1.2-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
11b08eeabf3a78214c7277ba5b98c14c1ab9b3212d7d33b6761526c0f461cafb - Sigstore transparency entry: 1279024871
- Sigstore integration time:
-
Permalink:
colour-white/whydep@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/colour-white
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ee9722a20484468694a9a7ceb111ba96037fe10 -
Trigger Event:
push
-
Statement type: