Skip to content

Generate Yaml

hexa.generate_yaml

Summary

Generate YAML spec (nested mapping form) from a hexa PortNode tree.

Classes

Functions

generate_yaml

1
2
3
generate_yaml(
    node: PortNode, out_path: str | Path | None = None
) -> str

Generate YAML source from a :class:PortNode tree.

Parameters

node : PortNode The root of the tree. out_path : str | Path | None Optional file path to write the generated source to.

Returns

str The generated YAML source.