dump_yaml
dump_yaml(obj, path: Union[str, Path] = None, **kwargs) -> None
-
Description
Write an object to a YAML file.
-
Parameters
- obj (
Any
): The object to write. - path (
Union[str, Path]
): The path to the YAML file. Defaults to None, indicating writing totmp.yaml
in the current directory. **kwargs
: Additional parameters foryaml.dump
.
- obj (
-
Example
import docsaidkit as D
data = {'key': 'value'}
D.dump_yaml(data)