Provides the DataModelDict class for creating, accessing and manipulating json/xml data structures.
DataModelDict is a lightweight Python class for easy transformation and manipulation of JSON and XML structured data models. It is designed to take the best aspects of JSON, XML, and Python dictionaries to allow the user to interact with any of these formats in the same manner.
The code has no requirements that limit which systems it can be used on, i.e. it should work on Linux, Mac and Windows computers.
The latest release can be installed using pip:
pip install DataModelDict
The code and all documentation is hosted on GitHub and can be directly downloaded at https://github.com/usnistgov/DataModelDict.
The key features of DataModelDict (so far) are:
#These two return the exact same val. val = my_model['a']['b']['c']['d'] path = ['a', 'b', 'c', 'd'] val = my_model[path]
DataModelDict works by parsing in a JSON or XML data model such that every dictionary level is an instance of DataModelDict. This allows for the conversion and functional methods to be callable both on the full model and on subcomponents.