yaml_model
Classes#
YamlModel #
Bases: BaseModel
Functions#
from_yaml
classmethod
#
Creates a python configuration object from a yaml file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath |
Path
|
The path to the yaml file |
required |
overrides |
Optional[Dict[str, Any]]
|
Overrides to apply to the yaml before instantiating the YamlModel object. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
YamlModel |
A YamlModel subclass |
Source code in tsdat/config/utils/yaml_model.py
generate_schema
classmethod
#
Generates JSON schema from the model fields and type annotations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output_file |
Path
|
The path to store the JSON schema. |
required |