Home Assistant Unofficial Reference 2024.12.1
homeassistant.util.yaml.dumper Namespace Reference

Functions

None add_representer (Any klass, Any representer)
 
str dump (dict|list _dict)
 
yaml.MappingNode represent_odict (dumper, tag, mapping, flow_style=None)
 
None save_yaml (str path, dict data)
 

Detailed Description

Custom dumper and representers.

Function Documentation

◆ add_representer()

None homeassistant.util.yaml.dumper.add_representer ( Any  klass,
Any  representer 
)
Add to representer to the dumper.

Definition at line 68 of file dumper.py.

◆ dump()

str homeassistant.util.yaml.dumper.dump ( dict | list  _dict)
Dump YAML to a string and remove null.

Definition at line 21 of file dumper.py.

◆ represent_odict()

yaml.MappingNode homeassistant.util.yaml.dumper.represent_odict (   dumper,
  tag,
  mapping,
  flow_style = None 
)
Like BaseRepresenter.represent_mapping but does not issue the sort().

Definition at line 41 of file dumper.py.

◆ save_yaml()

None homeassistant.util.yaml.dumper.save_yaml ( str  path,
dict  data 
)
Save YAML to a file.

Definition at line 32 of file dumper.py.