python-checkup
Fast, local-first Python code health checks with a single command.
A 0-100 health score for Python codebases. Runs Ruff, mypy, Bandit, Radon, Vulture, and deptry in parallel, scores six categories, and tells you what to fix first.
Quickstart
uvx python-checkup .
To see the full report in your browser:
uvx python-checkup . --web
To install persistently:
uv tool install python-checkup
Usage
# quick scan (Ruff + deptry only, ~3s)
uvx python-checkup . --profile quick
# full scan with all optional analyzers
uvx --from 'python-checkup[full]' python-checkup .
# only changed files vs a branch
uvx python-checkup . --diff main
# auto-fix what Ruff can, then rescan
uvx python-checkup . --fix
# filter categories
uvx python-checkup . --only quality,security
uvx python-checkup . --skip dead_code
# output formats
uvx python-checkup . --score # just the number
uvx python-checkup . --json # machine-readable
uvx python-checkup . --badge # shields.io URL
# CI gate
uvx python-checkup . --fail-under 70
What it runs
Default profile:
| Category | Tools |
|---|---|
| Code Quality | Ruff |
| Type Safety | mypy |
| Security | Bandit, Ruff S-rules |
| Complexity | Radon, Ruff C901 |
| Dead Code | Vulture |
| Dependencies | deptry |
Optional analyzers (install via extras):
| Extra | Adds |
|---|---|
vulns |
OSV-backed dependency vulnerability scanning |
secrets |
detect-secrets |
pyright |
basedpyright as type backend |
quality-extra |
typos for spelling checks |
mcp |
MCP server support |
full |
all of the above |
Scoring
Each category gets a 0-100 score. The overall score is a weighted average:
| Category | Default Weight |
|---|---|
| Code Quality | 25 |
| Type Safety | 20 |
| Security | 20 |
| Complexity | 15 |
| Dead Code | 10 |
| Dependencies | 10 |
When a category has no available analyzer, its weight redistributes proportionally to the rest.
| Score | Label |
|---|---|
| 75-100 | Healthy |
| 50-74 | Needs work |
| 0-49 | Critical |
See docs/scoring.md for the full methodology.
Configuration
Works without config. To customize, add to pyproject.toml:
[tool.python-checkup]
timeout = 60
[tool.python-checkup.weights]
quality = 25
types = 20
security = 20
complexity = 15
dead_code = 10
dependencies = 10
[tool.python-checkup.thresholds]
healthy = 75
needs_work = 50
[tool.python-checkup.ignore]
rules = ["S101"]
files = ["tests/**", "migrations/**"]
See docs/configuration.md for the full reference.
CI
Gate on score:
uvx python-checkup . --fail-under 70
GitHub Action:
- uses: nabroleonx/python-checkup@v1
with:
fail-under: 70
Also works as a pre-commit hook. See action.yml and .pre-commit-hooks.yaml.
MCP Server
Expose python-checkup to AI coding agents (Claude Code, Cursor, VS Code):
uvx --from 'python-checkup[mcp]' python-checkup mcp install --editor cursor
Registers five tools: python_checkup_diagnose, python_checkup_lint,
python_checkup_typecheck, python_checkup_security, python_checkup_explain_rule.
See docs/mcp-server.md for details.
Plugins
Add custom analyzers via entry points:
[project.entry-points."python-checkup.analyzers"]
my-analyzer = "my_package:MyAnalyzer"
See docs/plugins.md for the full guide.
Docs
docs/configuration.md-- weights, thresholds, ignore rulesdocs/scoring.md-- scoring methodologydocs/mcp-server.md-- MCP server setupdocs/plugins.md-- custom analyzer developmentdocs/development.md-- contributing
Development
uv sync --all-extras
uv run pytest
uv run ruff check python_checkup tests
uv run mypy python_checkup
License
MIT
Metadata
Release files for python-checkup 0.4.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 | Provenance | Actions |
|---|---|---|---|---|
| python_checkup-0.4.2.tar.gz | 201.3 kB | Without provenance | Details for python_checkup-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_checkup-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for python_checkup-0.4.2-py3-none-any.whl |
Total release size: 375.9 kB
Release files / python_checkup-0.4.2.tar.gz
| Download URL | python_checkup-0.4.2.tar.gz |
|---|---|
| Size | 201.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d778bddcb00a8eedcc4d9222f7926fe31724aaa37b8ae6ccaca3ba7361d2cb9a
|
|
BLAKE2b-256 checksum How to use checksums |
e5b2714a9bcf7a7bd4ae7e0c36dc584b081d31411f16c67e5d0b30b4730301b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / python_checkup-0.4.2-py3-none-any.whl
| Download URL | python_checkup-0.4.2-py3-none-any.whl |
|---|---|
| Size | 174.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b45abc76da2d85eeab46ca331a68aa4c0ee2f402e74dc1ecb02d0d7eda4f9c8
|
|
BLAKE2b-256 checksum How to use checksums |
13001245d016435052633f61c35cb6ce108dca1153d4c66f409b2e211588880e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for python-checkup 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.