def yaml_dumper_with_defaults(data: dict, text_stream: TextIO) -> None:
    """Easier way to get YAML dumper to handle unseralizable types"""
    yaml = YAML()
    # let JSON handle unserializable types and then load it back
    data = json.loads(json.dumps(data, default=str))
    yaml.default_flow_style = False
    yaml.dump(data, text_stream)
Easier way to get YAML dumper to handle unseralizable types
dynaconf/utils/inspect.py