save_yaml#
tiatoolbox
.utils
.misc
.save_yaml
- save_yaml(input_dict, output_path='output.yaml', parents=False, exist_ok=False)[source]#
Save dictionary as yaml.
- Parameters:
input_dict (dict) – A variable of type ‘dict’.
output_path (str or pathlib.Path) – Path to save the output file.
parents (bool) – Make parent directories if they do not exist. Default is False.
exist_ok (bool) – Overwrite the output file if it exists. Default is False.
Returns:
Examples
>>> from tiatoolbox import utils >>> input_dict = {'hello': 'Hello World!'} >>> utils.misc.save_yaml(input_dict, './hello.yaml')