File I/O
General Data Formats
WaterModels.parse_file — Functionparse_file(path)Parses an EPANET (.inp) or JavaScript Object Notation (JSON) file from the file path path, depending on the file extension, and returns a WaterModels data structure (a dictionary of data).
WaterModels.parse_json — Functionparse_json(path)Parses a JavaScript Object Notation (JSON) file from the file path path and returns a WaterModels data structure (a dictionary of data).
EPANET Data Files
The following method is the main exported method for parsing EPANET data files:
WaterModels.parse_epanet — Functionparse_epanet(path)Parses an EPANET (.inp) file from the file path path and returns a WaterModels data structure (a dictionary of data). See the OpenWaterAnalytics Wiki for a thorough description of the EPANET format and its components.