save_yaml

Contents

save_yaml#

save_yaml(yaml_dict: dict, output_yaml: str | CloudPath | Path, **kwargs) None[source]#

Save a YAML file

Parameters:
  • yaml_dict (dict) – YAML dictionary

  • output_yaml (AnyPathStrType) – Output file

  • **kwargs – Other arguments

Example

>>> output_yaml = 'D:/path/to/yaml.yaml'
>>> yaml_dict = {"A": np.int64(1), "B": datetime.today(), "C": SomeEnum.some_name}
>>> save_yaml(output_yaml, json_dict)