--- id: yamale version: "6.1.0" license: MIT license_treatment: permissive maintenance: active --- # yamale — A schema and validator for YAML. License: permissive · Maintenance: active · Downloads: 4.2M/mo ## 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 above — 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 pip install yamale uv add yamale 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_current - Install friction: low - Maintenance: active - Downloads: 4.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags yaml schema validation, yaml file validator, validate yaml against schema, yaml data validation, yaml structure checker, yaml type checking, yaml config validator, yaml, validation, schema [View on SkillFed](https://skillfed.io/packages/yamale) · [View on PyPI](https://pypi.org/project/yamale/)