YAML Loader¶
YamlLoader
¶
Bases: BaseLoader
Loads a YadsSpec from a YAML string.
Source code in src/yads/loaders/yaml_loader.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |
load(content)
¶
Parses the YAML content and builds the spec.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
The YAML string content. |
required |
Returns:
| Type | Description |
|---|---|
YadsSpec
|
A |
Raises:
| Type | Description |
|---|---|
SpecParsingError
|
If the YAML content is invalid or does not parse to a dictionary. |
Source code in src/yads/loaders/yaml_loader.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |