cfgv

3.5.0 · active · verified Sat Mar 28

cfgv is a Python library designed to validate configuration files and produce human-readable error messages. The current version is 3.5.0, and it follows a regular release cadence with updates and improvements.

Warnings

Install

Imports

Quickstart

A simple example demonstrating how to define a schema, load a configuration, and validate it using cfgv.

import cfgv

# Define your configuration schema
schema = {
    'host': str,
    'port': int,
    'debug': bool
}

# Load your configuration
config = {
    'host': 'localhost',
    'port': 8080,
    'debug': True
}

# Validate the configuration
cfgv.validate(config, schema)

view raw JSON →