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.

  • 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.


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

Return type



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