weldx.asdf.util.view_tree#
- weldx.asdf.util.view_tree(file, path=None, **kwargs)#
Display YAML header using IPython JSON display repr.
This function works in JupyterLab.
- Parameters:
file (
Union
[str
,Path
,IOBase
,SupportsFileReadOnly
,SupportsFileReadWrite
]) – filename or file-like object pointing towards / containing an ASDF file.path (
Optional
[tuple
]) – tuple representing the lookup path in the yaml/asdf treekwargs – kwargs passed down to JSON constructor
- Returns:
JSON object for rich output in JupyterLab
- Return type:
Examples
Visualize the full tree of an existing ASDF file:
weldx.asdf.utils.view_tree("single_pass_weld_example.asdf")
Visualize a specific element in the tree structure by proving the path:
weldx.asdf.utils.view_tree( "single_pass_weld_example.asdf", path=("process",) ) weldx.asdf.utils.view_tree( "single_pass_weld_example.asdf", path=("process", "welding_process") )