pypowsybl.network.load#

load(file, parameters=None, reporter=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 (Union[str, PathLike]) – path to the network file

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

  • reporter (Optional[Reporter]) – 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')
...