read_yaml#
- read_yaml(yaml_file: str | CloudPath | Path, print_file: bool = True) dict[source]#
Read a YAML file
- Parameters:
yaml_file (AnyPathStrType) – Path to YAML file
print_file (bool) – Print the configuration file
- Returns:
YAML data
- Return type:
Example
>>> json_path = 'D:/path/to/json.json' >>> read_json(json_path, print_file=False) {"A": 1, "B": 2}