File I/O

General Data Formats

WaterModels.parse_fileFunction
parse_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).

source
WaterModels.parse_jsonFunction
parse_json(path)

Parses a JavaScript Object Notation (JSON) file from the file path path and returns a WaterModels data structure (a dictionary of data).

source

EPANET Data Files

The following method is the main exported method for parsing EPANET data files: