
Splitting a Large YAML Config Into Several Files Cleanly
YAML has no include. Two ways to split a config: numbered fragments merged in order, and a custom include tag on a safe loader. Both tested, with traps.
Config files that look friendly until the indentation bites. Parsing it, linting it and avoiding its type surprises.

YAML has no include. Two ways to split a config: numbered fragments merged in order, and a custom include tag on a safe loader. Both tested, with traps.

How to lay out YAML config so it stays correct: base and overlays, secret references, a schema, strict loading, key style, comments and a CI check, tested.

A tested command-line guide to YAML: query, edit, merge, convert, lint, validate and diff with yq, yamllint and check-jsonschema, plus the traps found.

How a YAML tag makes PyYAML run code during load, a harmless demonstration, what changed in PyYAML 6 and the safe options for loading untrusted files.

A tested Python guide to YAML: safe loading, speed, strict keys, validation, clean output, round trips, merging, env substitution and a reference module.

Convert an XML config to YAML so a person can read and diff it, and learn why a YAML 1.1 loader turns the strings no and NO into false and 0755 into 493.

Find tabs and non-breaking spaces in YAML with grep, cat -A and git grep, fix them with sed or expand, and keep them out with editor settings and a hook.

PyYAML keeps the last of a repeated key silently, ruamel.yaml raises and yamllint flags it. A strict loader in eight lines and how merges create duplicates.

One XML file converted to JSON, CSV, YAML and Excel with one parse and four writers, what each target loses, and how to prove nothing went missing.

Colons, hashes, braces, backslashes and percent signs in YAML values: which break, which load silently wrong, tested outputs and the quoting rule.

Python 3.10 in a CI matrix loads as 3.1 in every parser. See the proof, why quoting is the fix and a script that finds suspect floats in a repository.

Leading zeros, hex, base 60 times and trailing zeros change what a number is. Real output for 0755, 12:30, 1.10 and 1e3, and how to protect values.
We send one email when a new article is published. No spam.