pyproject-lens
A small, free health scanner for Python projects. Point it at a folder and it checks the basics: packaging metadata, imports versus declared dependencies, Python-version claims, project layout, tests, obvious security footguns, documentation, and Git hygiene.
It is built for the first ten seconds of project review — not to replace Ruff, pytest, Bandit, or a human code review.
Install
pip install pyproject-lens
Use it
pyproject-lens .
pyproject-lens ./another-project --json report.json
pyproject-lens . --markdown report.md
pyproject-lens . --ci --minimum-score 75
You can also use it in Python:
from pyproject_lens import analyze
report = analyze(".")
print(report.score)
print(report.to_json())
What the score means
Each section starts at 100. Detected issues reduce only the relevant section, and the project score is the rounded average. The rules are deliberately simple and visible in src/pyproject_lens/analyzers.py; it is a conversation starter, not a grade.
What it checks
- Packaging:
pyproject.toml, project name, Python version, README - Dependencies: direct source imports compared with
project.dependencies - Compatibility: detects
match/caseused with a Python claim below 3.10 - Structure:
src/, packages, root modules, and tests directory - Testing: test file presence and a rough source-to-test-file signal — not coverage
- Security: possible hard-coded secrets,
eval/exec, andshell=True - Documentation: README, install/usage wording, license, and contribution guide
- Repository hygiene:
.gitignoreand uncommitted changes
Everything is free and open source under the MIT license.
Development
python -m pip install -e .
python -m unittest discover -s tests
Contributions are welcome. Please keep checks practical, explain what they found, and avoid claiming certainty when static analysis cannot prove something.
Metadata
Release files for pyproject-lens 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyproject_lens-0.2.2.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyproject_lens-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / pyproject_lens-0.2.2.tar.gz
| Download URL | pyproject_lens-0.2.2.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ea4ba2832cf73215f748db2f3f5349202a5e20c710561d0d335be02978e938ab
|
|
BLAKE2b-256 checksum How to use checksums |
a57d5f37457e50aa23d84c9f508f92aae689d7a1632e028df4c16561a2ef3d17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pyproject_lens-0.2.2-py3-none-any.whl
| Download URL | pyproject_lens-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccaf84216cc8de8aa5654aa43f2ac1d4205d2bd7481b1959949f701d061de31f
|
|
BLAKE2b-256 checksum How to use checksums |
b4ac6256bb98674fa17ef921cb3356564c71e3f9fde5e9b07edc06dd18385814
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|