eyconf.generate_yaml

Generate a default yaml file from a dataclass schema.

This is relatively dirty and not all edge cases might be covered. Works for most simple cases though.

Functions

dataclass_to_yaml(schema)

Generate a yaml string from a dataclass schema.

Classes

CommentLine(comment[, indent])

A comment line of yaml content.

EmptyLine()

An empty line of yaml content.

Line([is_comment, indent])

A line of yaml content.

MapLine(name, default_value, **kwargs)

A map line of yaml content.

SectionLine(name, **kwargs)

A section line of yaml content.

SequenceLine(default_value, **kwargs)

A sequence line of yaml content.

Module Functions

eyconf.generate_yaml.dataclass_to_yaml(schema: type[DataclassInstance] | DataclassInstance) str

Generate a yaml string from a dataclass schema.