Io
YamlIO
¶
Bases: ABC
Handles YAML inputs and outputs.
from_yaml(yaml_paths)
¶
Update the instance's attributes from one or more YAML files.
PARAMETER | DESCRIPTION |
---|---|
|
A sequence of YAML file paths or a single YAML file path.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
FileNotFoundError
|
If any of the YAML files cannot be found. |
to_yaml(file_path)
¶
Serialize a Pydantic BaseModel instance to a YAML file. Args: file_path: Path to the YAML file to write the serialized data to.
RAISES | DESCRIPTION |
---|---|
YamlIOError
|
If the file cannot be written to. |