write_yaml_config#
- openstef_core.base_model.write_yaml_config(config: BaseConfig, path: Path) None[source]#
Write the config to a YAML file.
- Parameters:
config (BaseConfig) – The configuration object to serialize.
path (Path) – Destination path for the YAML file (will be overwritten).
Example
>>> from pathlib import Path >>> from pydantic import BaseModel >>> class MyConfig(BaseModel): ... foo: int >>> cfg = MyConfig(foo=123) >>> write_yaml_config(cfg, Path("/tmp/test.yaml"))
- Parameters:
config (
BaseConfig)path (
Path)
- Return type:
None