skillfed

validate-pyproject

Validation library and CLI tool for checking on 'pyproject.toml' files using JSON Schema

validate-pyproject v0.25 334.5K downloads/30d#7,489 on PyPI209
Copyleft license MPL-2.0 and MIT and BSD-3-Clause Active released

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-pyproject

uv

uv add validate-pyproject

poetry

poetry add validate-pyproject

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonTopic :: Software Development :: Quality AssuranceTyping :: Typed

Tags

pyproject.toml validationpep 621 compliance checkerjson schema validation pythonpackaging standards validatorpyproject.toml linterpep 517 pep 518 validatortoml file validation tool
pep-compliancepackaging-toolspre-commit-hook

More Quality Assurance packages