cfgv
Validate configuration and produce human readable error messages.
Install
cfgv on PyPI
pip
pip install cfgvuv
uv add cfgvpoetry
poetry add cfgvPackage 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 — 267 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: cfgv-3.5.0-py2.py3-none-any.whl
About cfgv
from the package's own PyPI description — quoted content, verbatim
build status (image) pre-commit.ci status (image)
cfgv
Validate configuration and produce human readable error messages.
Installation
pip install cfgv
Sample error messages
These are easier to see by example. Here's an example where I typo'd true
in a pre-commit configuration.
pre_commit.clientlib.InvalidConfigError:
==> File /home/asottile/workspace/pre-commit/.pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='https://github.com/pre-commit/pre-commit-hooks')
==> At key: hooks
==> At Hook(id='flake8')
==> At key: always_run
=====> Expected bool got str
API
cfgv.validate(value, schema)
Perform validation on the schema:
- raises ValidationError on failure
- returns the value on success (for convenience)
cfgv.apply_defaults(value, schema)
Returns a new value which sets all missing optional values to their...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
cfgv validates configuration data structures and produces human-readable error messages that pinpoint exactly where validation failed, with support for nested maps, arrays, and conditional validation rules.
Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release (267 days ago) and clean CI/CD signals.
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects without restriction.
Usage
pip install cfgv
import cfgv
schema = cfgv.Map('Config', None, cfgv.Required('key', cfgv.check_string))
cfgv.validate({'key': 'value'}, schema)
Requires Python 3.10 or later.
Verdict: cfgv is a lightweight, well-maintained validation library with zero dependencies, permissive licensing, and no known vulnerabilities. It is suitable for projects needing schema-driven configuration validation with detailed error reporting.
Needs verification
- Whether the package is actively used in production by major projects beyond pre-commit ecosystem
- Performance characteristics when validating very large or deeply nested configuration structures
Similar packages
permissive · top 1,000 on PyPI
PyYAMLpermissive · top 100 on PyPI
referencingpermissive · top 100 on PyPI
identifypermissive · top 1,000 on PyPI
rfc3339-validatorpermissive · top 1,000 on PyPI
prekpermissive · top 1,000 on PyPI
sqlparsepermissive · top 1,000 on PyPI
multidictpermissive · top 100 on PyPI
strictyamlpermissive · top 1,000 on PyPI
openapi-spec-validatorpermissive · top 1,000 on PyPI