This release is a pre-release and may not be stable for production use.
Find the Python dependencies you barely use.
Most tools tell you what's unused. scant also tells you what's barely used. Think of those dependencies pulled in for one function, called on a couple of lines, that might be stopping you from your next Python upgrade (true story).
Built for plain English: flags are spelled out in full (--threshold-lines, not -L), and every result or error reads in words a non-developer can follow. The idea is to continue making the CLI very nice to look at. Like candy for your eyes.
Written in rust ⚡️
Install
pipx install scant
Usage
scant .
scant . --threshold-lines 5
scant . --env path/to/venv
scant . --env path/to/venv/bin/python
scant needs to read your dependencies' installed metadata to map a declared
name to what you actually import (e.g. PyYAML -> yaml) -- there's no
reliable way to do that without them being installed somewhere. It looks, in
order, at: --env if you passed it, $VIRTUAL_ENV, $CONDA_PREFIX, then any
pyvenv.cfg-marked folder under the scanned path (so .venv, venv, env,
venv311, etc. are all found automatically -- no need to name it right).
--env also accepts a direct interpreter path, not just a directory
(--env .venv/bin/python), which is handy inside containers or CI images
that install packages straight into a system Python.
If none of that resolves -- or more than one folder looks like a venv --
scant explains what it checked and how to point it at the right one,
rather than guessing:
$ scant .
Couldn't find a Python environment for this project.
scant needs to read your dependencies' installed metadata to map declared
names to imports (e.g. "PyYAML" -> "yaml") -- there's no reliable way to
do that without them actually being installed somewhere.
Checked:
├── $VIRTUAL_ENV not set
├── $CONDA_PREFIX not set
└── ./ no .venv, venv, or other pyvenv.cfg-marked folder
To fix this:
1. Activate a virtualenv with your dependencies installed, then re-run scant
2. Or point at one directly: scant . --env path/to/venv
3. Or point at an interpreter: scant . --env path/to/venv/bin/python
Example output
mkdocs -- 15 packages declared, 65 files read, 0.4s
Plan: drop 3, inline 4, keep 8.
ACTION PACKAGE USES LINES USE WHERE
drop colorama 0 0 none --
inline markupsafe 1 1 trivial mkdocs/utils/templates.py:55
inline pyyaml_env_tag 1 1 trivial mkdocs/utils/yaml.py:120
keep click 4 41 heavy mkdocs/__main__.py +3 files
keep watchdog 2 2 light mkdocs/livereload/__init__.py
License
MIT
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 scant-0.0.1a6.tar.gz.
File metadata
- Download URL: scant-0.0.1a6.tar.gz
- Upload date:
- Size: 60.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54008801bbc2f9e69b7dd89f0a19437efb1fe33276cfc844a23ec66c0b9fa376
|
|
| MD5 |
7aacb312d7c027e6aef2e1ff565aee4f
|
|
| BLAKE2b-256 |
c739f1cbb0de00353ed21a7b5b280b61b0d24379fc1321fd165f0c237094dbe1
|
Provenance
The following attestation bundles were made for scant-0.0.1a6.tar.gz:
Publisher:
release.yml on alan707/scant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scant-0.0.1a6.tar.gz -
Subject digest:
54008801bbc2f9e69b7dd89f0a19437efb1fe33276cfc844a23ec66c0b9fa376 - Sigstore transparency entry: 2578790871
- Sigstore integration time:
-
Permalink:
alan707/scant@712ed137abf15bb5cee2deba979d2230a30012f9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alan707
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@712ed137abf15bb5cee2deba979d2230a30012f9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scant-0.0.1a6-py3-none-win_amd64.whl.
File metadata
- Download URL: scant-0.0.1a6-py3-none-win_amd64.whl
- Upload date:
- Size: 2.5 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc1a8f3ff3a11e799307a26950c4426ef10585a6be38be0046a14a29c4b0a7c
|
|
| MD5 |
563d999f74ba33a932586a235ee9a2d8
|
|
| BLAKE2b-256 |
e290b8dd3dd0eb89ba9c56fbbe3d8b67eb497d2380ecd25e14ec4f5450ac68d5
|
Provenance
The following attestation bundles were made for scant-0.0.1a6-py3-none-win_amd64.whl:
Publisher:
release.yml on alan707/scant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scant-0.0.1a6-py3-none-win_amd64.whl -
Subject digest:
bcc1a8f3ff3a11e799307a26950c4426ef10585a6be38be0046a14a29c4b0a7c - Sigstore transparency entry: 2578790898
- Sigstore integration time:
-
Permalink:
alan707/scant@712ed137abf15bb5cee2deba979d2230a30012f9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alan707
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@712ed137abf15bb5cee2deba979d2230a30012f9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scant-0.0.1a6-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: scant-0.0.1a6-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48297fb84495f316785ea0167f00c44f8496f8b1ac9450cdaebc3e6c1365689e
|
|
| MD5 |
d115d4db54cd00902f97470cd929d5fb
|
|
| BLAKE2b-256 |
94324cc98d8a3742722b5d09d1d3f2fc2d64b7bedc1801c6f793c889a583a3f1
|
Provenance
The following attestation bundles were made for scant-0.0.1a6-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on alan707/scant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scant-0.0.1a6-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
48297fb84495f316785ea0167f00c44f8496f8b1ac9450cdaebc3e6c1365689e - Sigstore transparency entry: 2578790996
- Sigstore integration time:
-
Permalink:
alan707/scant@712ed137abf15bb5cee2deba979d2230a30012f9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alan707
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@712ed137abf15bb5cee2deba979d2230a30012f9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scant-0.0.1a6-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: scant-0.0.1a6-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67609bea41b6a353bbe5e7a9014f6c181a7f8af7d5eb866f27cb1a6a8d590e56
|
|
| MD5 |
f7d2fcdf4aac31067535bf1b2c4b9327
|
|
| BLAKE2b-256 |
99c4ce7825f0fb6df9e638616b4d65cd4359f624a8a2790bf3e100b511e7c634
|
Provenance
The following attestation bundles were made for scant-0.0.1a6-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on alan707/scant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scant-0.0.1a6-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
67609bea41b6a353bbe5e7a9014f6c181a7f8af7d5eb866f27cb1a6a8d590e56 - Sigstore transparency entry: 2578790961
- Sigstore integration time:
-
Permalink:
alan707/scant@712ed137abf15bb5cee2deba979d2230a30012f9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alan707
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@712ed137abf15bb5cee2deba979d2230a30012f9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scant-0.0.1a6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: scant-0.0.1a6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
390f6ed8ecc2383c706140f45600136a2bfa689488050becd4ebad9e1100f34b
|
|
| MD5 |
87b541d45326ca851e201523664b89ee
|
|
| BLAKE2b-256 |
b622ec649daa88070a12d8cd303edc9484f6334f1e5f5595fa66bde114c2e672
|
Provenance
The following attestation bundles were made for scant-0.0.1a6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on alan707/scant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scant-0.0.1a6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
390f6ed8ecc2383c706140f45600136a2bfa689488050becd4ebad9e1100f34b - Sigstore transparency entry: 2578790925
- Sigstore integration time:
-
Permalink:
alan707/scant@712ed137abf15bb5cee2deba979d2230a30012f9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alan707
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@712ed137abf15bb5cee2deba979d2230a30012f9 -
Trigger Event:
workflow_dispatch
-
Statement type: