Skip to main content

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 . --html report.html
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/case used 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, and shell=True
  • Documentation: README, install/usage wording, license, and contribution guide
  • Repository hygiene: .gitignore and uncommitted changes
  • Reports: terminal, JSON, Markdown, and a standalone HTML file

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.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyproject-lens 0.4.2
File Size Uploaded
pyproject_lens-0.4.2.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyproject-lens 0.4.2
File Interpreter ABI Platform
pyproject_lens-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / pyproject_lens-0.4.2.tar.gz

Download URL pyproject_lens-0.4.2.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7144b7de72fce02476afa35bad48ab4d214791748a3bb474a2eb1a6fef4b3543
BLAKE2b-256 checksum
How to use checksums
c676a964b9d74ac5c86fbf4c2b9135187c54e5d7aa21b1b1f1989c0b085d2576
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.4.2-py3-none-any.whl

Download URL pyproject_lens-0.4.2-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c858df9c8498d9455722c9fd4e6d71618ebeda6b6057a2ba60e368465cda2f55
BLAKE2b-256 checksum
How to use checksums
5d057d0ef0b8a4e257ef409ffe6e744bc13cc308ad42bd4f72bc666698d08914
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release history Release notifications | RSS feed

0.4.3

2 release files

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page