Ycleptic
Self-documenting YAML configuration for Python applications
One structured YAML file describes your application's configuration schema. From that single source of truth, Ycleptic gives you three things that normally live in three separate places:
- Validation & defaults — a user's YAML config is checked against the
schema (allowed keys, data types,
choices, required values), and omitted parameters are filled in from their declared defaults. - Generated documentation —
yclept make-docbuilds an RST/Sphinx documentation tree for your config directly from the schema. - Interactive help —
yclept config-helplets users explore the configuration tree and read the help text for every parameter.
Because the schema is data — a YAML file you ship as package data, not a set of Python classes — editing that one file keeps validation, documentation, and help in lockstep. No more reference docs drifting out of date because you added a parameter and forgot to write it up.
When to use it
Ycleptic fills a specific niche: it shines when your configuration's schema should double as its documentation, and when your users benefit from exploring that configuration interactively — a common situation in scientific and command-line applications whose users are domain experts rather than programmers.
It is intentionally not a heavyweight validation engine. If your main need is:
- robust validation, coercion, and rich error messages — reach for pydantic or jsonschema;
- composable, hierarchical config with overrides and interpolation — reach for Hydra / OmegaConf.
Ycleptic keeps validation deliberately lightweight and puts its weight behind the spec-as-documentation workflow. (It also supports a per-user dotfile/rcfile that extends or overrides the base config, merged in automatically at load time.)
How it works
As the developer, you write a base config that specifies what your users may configure:
# mypackage/data/base.yaml
attributes:
- name: temperature
type: float
text: Simulation temperature in kelvin
default: 300.0
- name: integrator
type: str
text: Integration scheme to use
choices: [verlet, langevin]
default: verlet
Your app reads the base config together with the user's config through the
Yclept class (typically subclassed):
from ycleptic import Yclept, YclepticError
try:
config = Yclept(basefile='mypackage/data/base.yaml', userfile=user_yaml)
except YclepticError as e:
raise SystemExit(f'Invalid configuration: {e}')
Then, from the same base config, you can generate reference documentation:
yclept make-doc mypackage/data/base.yaml --root docs/source/config_ref
and your users can explore the configuration interactively:
yclept config-help mypackage/data/base.yaml
Installation
pip install ycleptic
Documentation
Full documentation is at https://ycleptic.readthedocs.io/en/latest/.
Release History
See CHANGELOG.md for the full release history.
Meta
Cameron F. Abrams – cfa22@drexel.edu
Distributed under the MIT license. See LICENSE for more information.
https://github.com/cameronabrams
https://github.com/AbramsGroup
Contributing
- Fork it (https://github.com/cameronabrams/ycleptic/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ycleptic-2.2.1.tar.gz.
File metadata
- Download URL: ycleptic-2.2.1.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
435ad015e74244a7c89d28fcf0ba9077374a5d75b60231fb874e732837159c24
|
|
| MD5 |
0a2cbe87c3de1c8b73d0eea2ff66b702
|
|
| BLAKE2b-256 |
b6ca8e2046977eeedceaaa0eaf802f34a330b0164aa3cd07680454095e9e050a
|
Provenance
The following attestation bundles were made for ycleptic-2.2.1.tar.gz:
Publisher:
release.yaml on cameronabrams/ycleptic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ycleptic-2.2.1.tar.gz -
Subject digest:
435ad015e74244a7c89d28fcf0ba9077374a5d75b60231fb874e732837159c24 - Sigstore transparency entry: 2212627800
- Sigstore integration time:
-
Permalink:
cameronabrams/ycleptic@3a2e9dfda43d2b39c6cdae70a2c8a9532bb509b8 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3a2e9dfda43d2b39c6cdae70a2c8a9532bb509b8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ycleptic-2.2.1-py3-none-any.whl.
File metadata
- Download URL: ycleptic-2.2.1-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
873d86de9f2226faf1693c785f923bb75336e9b1a3197979a3df6fa2a25807f2
|
|
| MD5 |
92f703cc359cf8a241c2a3f6a8afb2e8
|
|
| BLAKE2b-256 |
7ed65dea9fb5fd26c5b6333eb8516ed5a316fb7ec4edabdc10aacb382e89b449
|
Provenance
The following attestation bundles were made for ycleptic-2.2.1-py3-none-any.whl:
Publisher:
release.yaml on cameronabrams/ycleptic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ycleptic-2.2.1-py3-none-any.whl -
Subject digest:
873d86de9f2226faf1693c785f923bb75336e9b1a3197979a3df6fa2a25807f2 - Sigstore transparency entry: 2212627867
- Sigstore integration time:
-
Permalink:
cameronabrams/ycleptic@3a2e9dfda43d2b39c6cdae70a2c8a9532bb509b8 -
Branch / Tag:
refs/tags/v2.2.1 - Owner: https://github.com/cameronabrams
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@3a2e9dfda43d2b39c6cdae70a2c8a9532bb509b8 -
Trigger Event:
push
-
Statement type: