cfgv
Validate configuration and produce human readable error messages.
Decision gist · record as of 2026-08-14
Yes. cfgv is a lightweight, actively maintained library with no dependencies, permissive licensing, and a clear, focused purpose. Install it if you need to validate configuration structures with human-friendly error messages; skip it if you only validate simple flat dictionaries or have no need for detailed error context.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction install with no runtime dependencies.
- Actively maintained with recent releases; last commit 2026-07-15 and latest release 2025-11-19.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
last release 2025-11-19 (268 days) · last repo commit 2026-07-15 · 52 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 178,635,376 downloads/mo, #232 on PyPI
Alternatives
Verify before relying
pip install cfgv
import cfgv
schema = cfgv.Map('Config', None, cfgv.Required('key', cfgv.check_string))
result = cfgv.validate({'key': 'value'}, schema)- Whether the package is actively used in production by projects beyond pre-commit ecosystem.
- Performance characteristics when validating very large or deeply nested configuration structures.
What it is and what it does
cfgv is a configuration validation library that checks data against declarative schemas and reports validation failures with precise, multi-level error context. Instead of generic type errors, it shows the exact path through nested structures where validation failed—for example, identifying which repository, hook, and field caused a problem in a configuration file.
The library provides building blocks (Map, Array, KeyValueMap) to compose schemas, validators (Required, Optional, Conditional) to specify field rules, and check functions (check_type, check_one_of, check_regex) to validate individual values. It handles default values, can load from files with custom parsers, and supports custom containers and validators when built-in ones don't fit.
Use it for
- Validate YAML or JSON configuration files for tools and frameworks, with error messages that show the exact nesting path to the problem.
- Build configuration schemas for CLI tools or libraries where you want users to see clear, actionable error messages rather than cryptic exceptions.
- Apply and remove default values from configuration dictionaries while preserving the original structure.
- Enforce conditional validation rules where certain fields are required only if other fields have specific values.
- Load configuration from multiple file formats (JSON, YAML, TOML) using a single schema and consistent error handling.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
cfgv is a lightweight, actively maintained library with no dependencies, permissive licensing, and a clear, focused purpose. Install it if you need to validate configuration structures with human-friendly error messages; skip it if you only validate simple flat dictionaries or have no need for detailed error context.
Install
cfgv on PyPI
Before you install
Low friction install with no runtime dependencies. Actively maintained with recent releases; last commit 2026-07-15 and latest release 2025-11-19. Requires Python 3.10 or later.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install cfgv
import cfgv
schema = cfgv.Map('Config', None, cfgv.Required('key', cfgv.check_string))
result = cfgv.validate({'key': 'value'}, schema)
Verify before relying
- Whether the package is actively used in production by projects beyond pre-commit ecosystem.
- Performance characteristics when validating very large or deeply nested configuration structures.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 268 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 178,635,376 / month, #232 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: cfgv-3.5.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “human readable validation errors”
- cfgvValidates configuration data against schemas and produces detailed,…
- humanreadableParses human-readable time and bitrate strings (e.g. '120 sec', '1…
- base32-crockfordEncodes and decodes data using Douglas Crockford's base32 scheme, a…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Yamale validates YAML files against a schema you define, catching structural and type errors before your application processes the data.
A command-line tool and pre-commit hook that validates JSON and YAML files against JSON Schema, with support for local and remote schemas.
Install it if you need to validate JSON or YAML against schemas in a CLI or pre-commit context—it does exactly that without bloat.
Provides a collection of reusable pre-commit hooks for common code quality and file validation checks, integrated with the pre-commit framework.
Validates Kubernetes resource definitions against official Kubernetes JSON schemas, reporting schema mismatches and type errors.
Validates CSV files against a schema definition, checking field types, constraints, and data integrity rules.
Confu validates and generates configuration files, providing a framework to define, check, and produce structured configuration data.
However, dormancy since 2024-02-21 means no recent bug fixes or feature updates—suitable for stable, mature use cases but not for projects requiring active upstream…
See also fastjsonschema · eido · genson · strictyaml