pypowsybl.network.load#

load(file, parameters=None, post_processors=None, reporter=None, report_node=None)[source]#

Load a network from a file. File should be in a supported format.

Basic compression formats are also supported (gzip, bzip2).

Parameters:
  • file (str | PathLike) – path to the network file

  • parameters (Dict[str, str] | None) – a dictionary of import parameters

  • post_processors (List[str] | None) – a list of import post processors (will be added to the ones defined by the platform config)

  • reporter (ReportNode | None) – deprecated, use report_node instead

  • report_node (ReportNode | None) – the reporter to be used to create an execution report, default is None (no report)

Returns:

The loaded network

Return type:

Network

Examples

Some examples of file loading, including relative or absolute paths, and compressed files:

network = pp.network.load('network.xiidm')
network = pp.network.load('/path/to/network.xiidm')
network = pp.network.load('network.xiidm.gz')
network = pp.network.load('network.uct')
...