deploy_tools.models.save_and_load#

Members

LoadError

Raised when configuration files cannot be loaded into the model.

load_deployment

Load Deployment configuration from a yaml file.

load_from_yaml

Load a single Pydantic model from a yaml file.

save_as_yaml

Serialise a Pydantic model to YAML and write it to the given path.

exception deploy_tools.models.save_and_load.LoadError[source]#

Raised when configuration files cannot be loaded into the model.

deploy_tools.models.save_and_load.save_as_yaml(obj: BaseModel, output_path: Path, create_parents: bool = False) None[source]#

Serialise a Pydantic model to YAML and write it to the given path.

deploy_tools.models.save_and_load.load_from_yaml(model: type[T], input_stream: TextIO | BinaryIO) T[source]#

Load a single Pydantic model from a yaml file.

deploy_tools.models.save_and_load.load_deployment(config_folder: Path) Deployment[source]#

Load Deployment configuration from a yaml file.