Skip to content

tdfs4ds.deploy.yamlio

tdfs4ds.deploy.yamlio

Deterministic YAML for deployment bundles (0.3.8.15).

Every file a bundle holds is written by :func:dump_yaml: keys sorted, block scalars (|) for any multi-line text (SQL), no flow style, UTF-8, LF line ends, so two exports of the same store are byte-identical and a diff in git shows only what changed.

yaml (PyYAML) is imported inside the functions: import tdfs4ds never loads it.

_dumper

_dumper()

_plain

_plain(obj: Any) -> Any

Only YAML-safe types: dict / list / str / int / float / bool / None. Pure.

dump_yaml

dump_yaml(obj: Any) -> str

obj as deterministic YAML text (ends with a newline).

load_yaml

load_yaml(text: str) -> Any

write_text

write_text(path, text: str) -> str

Write text UTF-8 with LF line ends; parents created. Returns the path.

read_yaml_file

read_yaml_file(path) -> Any

dump_json

dump_json(obj: Any) -> str

Deterministic JSON (sorted keys, 2-space indent, LF, trailing newline).