Python API reference
yaml_to_python_project() | yaml_to_api_document()YAML conversion API
Convert canonical YAML either into Python source modules or into the flat designer/API JSON model.
When to use
Use these functions at integration boundaries rather than manually rewriting topology collections and references.
Behavior
yaml_to_python_projectemits a complete importable package and returns its main.py path.yaml_to_api_documentports the designerfromYaml(...).toJSON()conversion.- Both functions accept a path or parsed Mapping; API conversion also accepts YAML text.
yaml_to_python_project() properties
Reverse source generation.
PropertyTypeDescription
sourcestr | Path | Mapping[str, Any]Canonical YAML input.
Requiredoutput_dirstr | PathNew package root.
RequiredreturnPathGenerated package main.py.
yaml_to_api_document() properties
Designer-compatible JSON conversion.
PropertyTypeDescription
sourceYAML str | Path | MappingCanonical topology input.
Requiredreturndict[str, Any]Flat settings, streams, services, dataConnectors, endpoints, types, links, pools, and modules payload.
Python example
entrypoint = yaml_to_python_project(
"architecture.yaml", "generated_orders"
)
payload = yaml_to_api_document("architecture.yaml")