pypowsybl.network.is_loadable

is_loadable(file)[source]

Check if a file is a loadable network.

A file is loadable if:
  • file exists

  • it is a network format and format version supported by powsybl (so an importer exists for it)

  • the network file is well formatted

  • it is either not compressed or compressed with a supported compression format (gzip, bzip2, zip, xz)

Parameters:

file (str | PathLike) – path to the supposed network file

Returns:

True is the file is a loadable network, False otherwise

Return type:

bool