weldx.asdf.util.get_yaml_header¶
- weldx.asdf.util.get_yaml_header(file, parse=False)¶
Read the YAML header part (excluding binary sections) of an ASDF file.
- Parameters
file (
Union
[str
,Path
,IOBase
,SupportsFileReadOnly
,SupportsFileReadWrite
]) – a path or file-like type pointing to a ASDF file.parse – if
True
, returns the interpreted YAML header as dict.
- Returns
The YAML header as string the ASDF file, if parse is False. Or if parse is True, return the parsed header.
- Return type