from_dict

classmethod Dict.from_dict(dct, project=None, delim=' | ')[source]

This method converts a correctly formatted dictionary into OpenPNM objects, and returns a handle to the project containing them.

Parameters
  • dct (dictionary) – The Python dictionary containing the data. The nesting and labeling of the dictionary is used to create the appropriate OpenPNM objects.

  • project (Project) – The project with which the created objects should be associated. If not supplied, one will be created.

Returns

project – An OpenPNM Project containing the objects created to store the given data.

Return type

list

Notes

The requirement of a correctly formed dictionary is rather strict, and essentially means a dictionary produced by the to_dict method of this class.