confiddler¶
confiddler
has tools to help you define and load YAML configuration files.
Here’s the basic idea:
Define your config file structure with a JSON schema. (See json-schema.org or jsonschema).
Help your users get started by showing them a default config file which is:
- auto-generated from your defaults, and
- auto-commented with your schema
description
.
Load a user’s config file with
confiddler.load_config()
, which will:- validate it against your schema
- auto-inject default values for any settings the user omitted
See the Quickstart for a short example.
Install¶
Install from PyPI:
pip install confiddler
…or with conda:
conda install -c stuarteberg -c conda-forge confiddler