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