--- id: validate-pyproject version: "0.25" license: MPL-2.0 and MIT and BSD-3-Clause license_treatment: copyleft maintenance: active --- # validate-pyproject — Validation library and CLI tool for checking on 'pyproject.toml' files using JSON Schema License: copyleft · Maintenance: active · Downloads: 334.5K/mo ## 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 above — 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 pip install validate-pyproject uv add validate-pyproject 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_current - Install friction: low - Maintenance: active - Downloads: 334.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pyproject.toml validation, pep 621 compliance checker, json schema validation python, packaging standards validator, pyproject.toml linter, pep 517 pep 518 validator, toml file validation tool, pep-compliance, packaging-tools, pre-commit-hook [View on SkillFed](https://skillfed.io/packages/validate-pyproject) · [View on PyPI](https://pypi.org/project/validate-pyproject/)