validate-pyproject
Validation library and CLI tool for checking on 'pyproject.toml' files using JSON Schema
What it is and what it does
validate-pyproject is a validation library and CLI tool that checks pyproject.toml files for compliance with Python packaging standards (PEP 517, PEP 518, PEP 621) using JSON Schema definitions. It can be used as a standalone command-line tool via pipx, embedded in Python scripts through its API, or integrated as a pre-commit hook.
The package relies on fastjsonschema for schema validation and optionally uses packaging and trove-classifiers to validate metadata and classifier fields. It is marked as experimental and under active development. Users can extend validation with plugins, and a companion schema-store plugin provides vendored SchemaStore entries for tool-specific pyproject.toml schemas.
Use it for:
- Validate pyproject.toml files in CI/CD pipelines to catch configuration errors before packaging
- Enforce PEP 621 compliance in monorepos or multi-project organizations
- Integrate validation into pre-commit hooks to catch invalid metadata at commit time
- Programmatically validate pyproject.toml in build tools or package management scripts
- Verify that custom tool-specific sections in pyproject.toml match their expected schemas
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates pyproject.toml files against JSON Schema definitions to ensure compliance with Python packaging standards and PEPs.
Yes. Low install friction, active maintenance, no known vulnerabilities, and clear utility for anyone managing Python packages. The copyleft license (MPL-2.0 primary) is standard for development tools. Install with [all] extras for full CLI and PEP 621 validation; use the base package if you only need the Python API.
Install
validate-pyproject on PyPI
pip
pip install validate-pyprojectuv
uv add validate-pyprojectpoetry
poetry add validate-pyprojectInstalling validate-pyproject
Before you install
Low friction: pure Python wheel with a single runtime dependency (fastjsonschema). Actively maintained with recent commits and steady releases since 2021.
License in practice
Triple-licensed under MPL-2.0, MIT, and BSD-3-Clause (copyleft treatment). Users must comply with at least one of these licenses; MPL-2.0 is the most restrictive of the three.
Quickstart
from validate_pyproject import api, errors
pyproject_dict = {"project": {"name": "example"}}
validator = api.Validator()
try:
validator(pyproject_dict)
except errors.ValidationError as ex:
print(f"Invalid: {ex.message}")
Requires Python 3.8+. The packaging dependency is mandatory; trove-classifiers is optional but recommended to avoid network calls.
Verify before relying
- Whether the package's JSON Schema definitions stay current with evolving PEP standards without manual updates
- Performance characteristics when validating large or complex pyproject.toml files
- Whether network fallback for classifier validation (when trove-classifiers not installed) is reliable in CI/CD environments
Package facts
| License | MPL-2.0 and MIT and BSD-3-Clause (copyleft) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — fastjsonschema |
| Maintenance | actively maintained — 193 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 334,508/month — #7,489 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: validate_pyproject-0.25-py3-none-any.whl
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
pyproject-tomlParses and validates Python project metadata…
permissive · top 15,000 on PyPI
validate-pyproject-schema-storeProvides a versioned snapshot of SchemaStore…
permissive · top 15,000 on PyPI
pyproject-metadataValidates and transforms pyproject.toml…
permissive · top 5,000 on PyPI
pyproject-parserParses and extracts metadata from…
permissive · top 15,000 on PyPI
check-manifestValidates that a Python package's MANIFEST.in…
permissive · top 5,000 on PyPI
trove-classifiersProvides the canonical set of valid PyPI…
permissive · top 100 on PyPI
pyromaPyroma rates how well a Python project complies…
permissive · top 15,000 on PyPI
dependency-groupsParses and resolves PEP 735 dependency groups…
permissive · top 5,000 on PyPI
sampleprojectA minimal reference implementation…
permissive · top 15,000 on PyPI
pdm-pep517A PEP 517 build backend that reads PEP 621…
permissive · top 15,000 on PyPI