pykwalify
Python lib/cli for JSON/YAML schema validation
What it is and what it does
pykwalify is a YAML and JSON schema validator that implements the Kwalify specification, originally ported from a Java framework. It lets you define validation rules in a schema file and check whether your data conforms to those rules, catching structural and type errors before they propagate downstream. The library works with both YAML and JSON formats and can be used programmatically in Python or invoked from the command line.
It depends on ruamel.yaml for YAML parsing (chosen for better YAML 1.2 spec compliance), python-dateutil for date handling, and docopt for CLI argument parsing. The package is marked as Production/Stable but has not been actively maintained since late 2020, so it may not integrate smoothly with recent dependency updates.
Use it for:
- Validate configuration files (YAML or JSON) against a schema before loading them into an application
- Enforce data structure contracts in data pipelines or ETL workflows
- Test API responses or data exports against expected schemas in automated test suites
- Catch structural errors in user-supplied YAML/JSON input early in processing
- Define and enforce schema rules for multi-stage data transformations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates YAML and JSON data against schemas using a Kwalify-based rule system, available as both a Python library and command-line tool.
Yes, if you need YAML/JSON schema validation and are working within Python 3.6, 3.7, 3.8, or 3.9. The library is stable, has no known vulnerabilities, and low install friction. However, choose it cautiously for new projects: the package is dormant and may not support newer Python versions. For actively maintained alternatives, evaluate other validators first.
Install
pykwalify on PyPI
pip
pip install pykwalifyuv
uv add pykwalifypoetry
poetry add pykwalifyInstalling pykwalify
Before you install
Low install friction with three straightforward runtime dependencies (docopt, python-dateutil, ruamel.yaml). However, the package is dormant—last release was 2020-12-30 and no commits since 2024-01-21—so expect no active maintenance or updates.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
pip install pykwalify
from pykwalify.core import Core
c = Core(source_data={'foo': 'bar'}, schema_data={'type': 'map', 'mapping': {'foo': {'type': 'str'}}})
c.validate()
Verify before relying
- Whether the package works reliably with Python versions beyond those listed (3.6, 3.7, 3.8, 3.9)
- Current state of compatibility with modern versions of ruamel.yaml and python-dateutil
- Whether dormancy affects real-world reliability for production use cases
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — docopt, python-dateutil, ruamel.yaml |
| Maintenance | dormant — 2,053 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,630,564/month — #2,551 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pykwalify-1.8.0-py2.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
yamaleYamale validates YAML files against a schema…
permissive · top 5,000 on PyPI
annotatedyamlParses and validates YAML files with support…
permissive · top 15,000 on PyPI
strictyamlStrictYAML parses and validates YAML documents…
permissive · top 1,000 on PyPI
validator-collectionProvides 60+ validator functions for checking…
permissive · top 15,000 on PyPI
swagger-spec-validatorValidates Swagger/OpenAPI specifications…
permissive · top 15,000 on PyPI
warlockWarlock creates self-validating Python objects…
permissive · top 15,000 on PyPI
check-jsonschemaA command-line tool and pre-commit hook that…
permissive · top 5,000 on PyPI
eidoValidates project metadata against PEP schemas…
permissive · top 15,000 on PyPI
kubernetes-validateValidates Kubernetes resource definitions…
permissive · top 15,000 on PyPI
yamlpathQuery, retrieve, update, merge, validate, and…
permissive · top 15,000 on PyPI