skillfed

yamale

A schema and validator for YAML.

yamale v6.1.0 4.2M downloads/30d#2,353 on PyPI771
Permissive license MIT Active released

What it is and what it does

Yamale is a YAML schema validator that lets you define the structure, types, and constraints your YAML files must satisfy, then validates one or many files against that schema. It works both as a command-line tool and as a Python library, making it useful for configuration validation, data pipeline checks, and automated testing of YAML-based inputs.

The package depends only on pyyaml (with an optional ruamel.yaml for YAML 1.2 support) and supports Python 3.8 through 3.14. You write schemas in plain YAML using validators like str(), int(), bool(), enum(), and include() for reusable structures. When validation fails, yamale reports all errors at once rather than stopping at the first one, helping you fix multiple issues in a single pass.

Use it for:

  • Validate application configuration files before deployment to catch typos and type mismatches early.
  • Enforce schema on YAML data files in CI/CD pipelines to prevent invalid data from entering downstream processes.
  • Define and validate structured test fixtures or mock data in test suites.
  • Check Kubernetes manifests or other infrastructure-as-code YAML files for correctness.
  • Validate user-supplied YAML input in web services or CLI tools before processing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Yamale validates YAML files against a schema you define, catching structural and type errors before your application processes the data.

Yes. Yamale is actively maintained, has no known vulnerabilities, installs with minimal friction, and solves a concrete problem—catching YAML structure errors before they cause runtime failures. It's well-suited for any workflow where YAML files are a critical input and validation overhead is worth the safety gain.

Install

yamale on PyPI

pip

pip install yamale

uv

uv add yamale

poetry

poetry add yamale

Installing yamale

Before you install

Low friction: pure Python wheel with a single runtime dependency (pyyaml). The package is actively maintained with a recent release and no known vulnerabilities.

License in practice

MIT license is permissive; you can use, modify, and distribute yamale freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install yamale

import yamale
schema = yamale.make_schema('./schema.yaml')
data = yamale.make_data('./data.yaml')
yamale.validate(schema, data)

Requires Python 3.8 or later. Schema and data files must be valid YAML.

Verify before relying

  • Performance characteristics when validating large YAML files or many files in parallel.
  • Whether the optional ruamel.yaml dependency provides meaningful advantages over the default pyyaml parser in typical workflows.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pyyaml
Maintenance actively maintained — 267 days since the last release
Last repo commit
First released
Downloads 4,245,504/month — #2,353 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yamale-6.1.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

yaml schema validationyaml file validatorvalidate yaml against schemayaml data validationyaml structure checkeryaml type checkingyaml config validator
yamlvalidationschema

More Quality Assurance packages