skillfed

pykwalify

Python lib/cli for JSON/YAML schema validation

pykwalify v1.8.0 3.6M downloads/30d#2,551 on PyPI299
Permissive license MIT DORMANT released

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 pykwalify

uv

uv add pykwalify

poetry

poetry add pykwalify

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

yaml json schema validationkwalify validatordata validation rulesyaml schema checkerjson data validation libraryconfiguration file validationschema-based data validation
schema-validationcli-tool

More Quality Assurance packages