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 HabitatSpec as YAML.

Uses HabitatSpec.to_dict() (fingerprint-stable omissions). For a complete effective spec: section, call HabitatSpec.to_yaml(); for a runnable v1 document (data/policy/output), call save_habitat_config().

Parameters:
  • spec – The specification to serialise.

  • path – Destination file.

Returns:

The written path.