pyrit.common.YamlLoadable#
- class YamlLoadable[source]#
Bases:
ABCAbstract base class for objects that can be loaded from YAML files.
- __init__()#
Methods
__init__()from_yaml_file(file)Creates a new object from a YAML file.
- classmethod from_yaml_file(file: Path | str) T[source]#
Creates a new object from a YAML file.
- Parameters:
file – The input file path.
- Returns:
A new object of type T.
- Raises:
FileNotFoundError – If the input YAML file path does not exist.
ValueError – If the YAML file is invalid.