weldx.WeldxFile.as_attr#
- WeldxFile.as_attr()#
Return the Weldx dictionary as an attributed object.
- Returns:
This dictionary wrapped such, that all of its keys can be accessed as properties.
- Return type:
MutableMapping
Examples
>>> tree = dict(wx_meta={"welder": "Nikolai Nikolajewitsch Benardos"}) >>> wf = WeldxFile(tree=tree, mode="rw") >>> wfa = wf.as_attr() >>> wfa.wx_meta.welder 'Nikolai Nikolajewitsch Benardos'
We can also change the data easily
>>> wfa.wx_meta.welder = "Myself" >>> wfa.wx_meta.welder 'Myself'