weldx.asdf.util.asdf_json_repr

weldx.asdf.util.asdf_json_repr(file, path=None, **kwargs)

Display YAML header using IPython JSON display repr.

This function works in JupyterLab.

Parameters
  • file – filename or BytesIO buffer of ASDF file

  • path (Optional[Tuple]) – tuple representing the lookup path in the yaml/asdf tree

  • kwargs – kwargs passed down to JSON constructor

Returns

JSON object for rich output in JupyterLab

Return type

IPython.display.JSON

Examples

Visualize the full tree of an existing ASDF file:

weldx.asdf.utils.asdf_json_repr("single_pass_weld_example.asdf")

Visualize a specific element in the tree structure by proving the path:

weldx.asdf.utils.asdf_json_repr(
    "single_pass_weld_example.asdf", path=("process", "welding_process")
)