save_habitat_spec
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- save_habitat_spec(spec: HabitatSpec, path: str | Path) Path[source]
Write a
HabitatSpecas YAML.Uses
HabitatSpec.to_dict()(fingerprint-stable omissions). For a complete effectivespec:section, callHabitatSpec.to_yaml(); for a runnable v1 document (data/policy/output), callsave_habitat_config().- Parameters:
spec – The specification to serialise.
path – Destination file.
- Returns:
The written path.