PyPowSyBl
The PyPowSyBl project gives access PowSyBl Java framework to Python developers. This Python integration relies on GraalVM to compile Java code to a native library.
Documentation
Latest version of the documentation with API reference and many code samples is here.
To contribute to the documentation follow the instructions in the documentation README page.
Notebooks
Notebooks demonstrating PyPowSyBl features can be found in this repository.
Installation
PyPowSyBl is released on PyPi for Python 3.10 to 3.14, on Linux (x86_64 and arm64), MacOS (arm64) and Windows.
First, make sure you have an up-to-date version of pip and setuptools:
pip install --upgrade setuptools pip
Then you can install PyPowSyBl using pip:
pip install pypowsybl
Contributing
See Contributing.md for explanations on how to contribute to the code.
See Security.md to read about the security policy.
Getting started
First, we have to import pypowsybl:
import pypowsybl as pp
We can create an IEEE 14 buses network and run a load flow computation:
n = pp.network.create_ieee14()
results = pp.loadflow.run_ac(n)
print(results)
[ComponentResult(connected_component_num=0, synchronous_component_num=0, status=CONVERGED, status_text=CONVERGED, iteration_count=3, reference_bus_id='VL1_0', slack_bus_results=[SlackBusResult(id='VL1_0', active_power_mismatch=-0.006730108618313579)], distributed_active_power=0.0)]
We can now get buses data (like any other network elements) as a Pandas dataframe:
buses = n.get_buses()
print(buses)
v_mag v_angle
VL1_0 1.060 0.00
VL2_0 1.045 -4.98
VL3_0 1.010 -12.72
VL4_0 1.019 -10.33
VL5_0 1.020 -8.78
VL6_0 1.070 -14.22
VL7_0 1.062 -13.37
VL8_0 1.090 -13.36
VL9_0 1.056 -14.94
VL10_0 1.051 -15.10
VL11_0 1.057 -14.79
VL12_0 1.055 -15.07
VL13_0 1.050 -15.16
VL14_0 1.036 -16.04
This is just a quick appetizer of PyPowSyBl features. PyPowsybl provides a lot more features: security analysis, sensitivity analysis, handling of multiple file formats (including CGMES), substation and network diagrams generation, ... For more details and examples, go to the documentation and Jupyter notebooks.
Build from sources
That section is intended for developers who wish to build pypowsybl from the sources in this repository.
Requirements:
- Maven >= 3.1
- Cmake >= 3.20
- C++11 compiler
- Python >= 3.10 for Linux (x86_64 and arm64), MacOS (arm64) and Windows
- Oracle GraalVM Java 21
To build from sources and install PyPowSyBl package:
git clone https://github.com/powsybl/pypowsybl.git
cd pypowsybl
export JAVA_HOME=<path to GraalVM>
pip install --upgrade setuptools pip
pip install -r requirements.txt
pip install .
While developing, you may find it convenient to use the developer (or editable) mode of installation:
pip install -e .
# or, to build the C extension with debug symbols:
python setup.py build --debug develop --user
Please refer to pip and setuptools documentations for more information.
To build a faster, profile-guided optimized (PGO) native image, which requires Oracle GraalVM, see tools/pgo/README.md.
To run unit tests:
pytest tests
To run static type checking with mypy:
mypy -p pypowsybl
To run linting inspection with pylint:
pylint pypowsybl
Building with extra Java plug-ins
A native image cannot load Java code at run time and the layered graalvm feature is still alpha, so a powsybl plug-in (for example an additional importer or exporter shipped as a jar) can only be added to pypowsybl when the native library is built. Set PYPOWSYBL_EXTRA_JARS to the
plug-in's jars, separated by the platform path separator (: on Linux and macOS, ; on Windows), before building:
export PYPOWSYBL_EXTRA_JARS=/path/plugin.jar:/path/dependency.jar
pip install .
Metadata
Release files for pypowsybl 1.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 1.2 GB
Release files / pypowsybl-1.17.0-cp314-cp314-win_amd64.whl
| Download URL | pypowsybl-1.17.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 56.6 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5ae4e010825161a7161d84f52db961e968f29847e79fee8b896d199465091b4e
|
|
BLAKE2b-256 checksum How to use checksums |
3455dd5ccb1a413d0da5b40e992c075a5e0b9b319b2e745184d2f8c39590f2d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pypowsybl-1.17.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 69.4 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
27657edc48402ebe69d62189914f71ca6af62b4e6172311f2f748f46275c7ec8
|
|
BLAKE2b-256 checksum How to use checksums |
0e2ac9d7cc586b76c6ab2c0f40405483a1fa97b84cf50bc1936a16fe744c0ae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pypowsybl-1.17.0-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 62.1 MB |
| Tags | CPython 3.14 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
a891c9041ed1d1317c5741266f54897437ab383538c48ff7faa4665ea37b1ba1
|
|
BLAKE2b-256 checksum How to use checksums |
d39b908dec0bd158b5c681cfc066e10fa3c15ce0d48d9bd4bb621b493eb0cbdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pypowsybl-1.17.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 58.1 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d175698cb00d1d394eccd0e62ed5c51bf71d1f5c2f545730ee42d420038d1e86
|
|
BLAKE2b-256 checksum How to use checksums |
007e65642d44604f335f95c0caabaa82d9246c171609c233af1d17f0780758d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp313-cp313-win_amd64.whl
| Download URL | pypowsybl-1.17.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 54.9 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b087791479ea7c41da794c51c317ec27e37acbe8f92a5fb109853a45592d0533
|
|
BLAKE2b-256 checksum How to use checksums |
b40da9b083d162d47ecfa22c08e5e0bc11ad11dbdbfb1db6e2eed0431ef574ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pypowsybl-1.17.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 69.4 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9193d2698c731eb161f08a11e346bae304e276a0438f40ae802f0cbcafe95cc6
|
|
BLAKE2b-256 checksum How to use checksums |
006511f0906e8579412cfa5c6f31cbf3c7a3aea4fcdb7cffaaf9ccc291a8f8fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pypowsybl-1.17.0-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 62.1 MB |
| Tags | CPython 3.13 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
1e28add6306a9c4baa86ecb26c8d0071de985d8c1def8e23e85f45bc1f81d9e8
|
|
BLAKE2b-256 checksum How to use checksums |
dc10d4c810704127ba4bcd479ae7643d47272762b0654fd386e5b0f92d30a9c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pypowsybl-1.17.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 58.1 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b545126b47baf6600e49b90ae5e800d6200245086a13b8e4e15291e9b92390ec
|
|
BLAKE2b-256 checksum How to use checksums |
bea8ef838ab77a55847cbba1b16dad396aba96226142548397b7821925ace584
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp312-cp312-win_amd64.whl
| Download URL | pypowsybl-1.17.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 54.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b4fd312785193129bbd07762c3cfe5afb071d4b65b64db7985738892c63a22a4
|
|
BLAKE2b-256 checksum How to use checksums |
6e81b8deaa4f3208a6e370441109011440122f742001096fef46d8ae823e256b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pypowsybl-1.17.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 69.4 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0aa3819520720e25e24192b3f697abb5f0d65c768c10bdcb8c70b98e9915bb04
|
|
BLAKE2b-256 checksum How to use checksums |
570dbf1e6a057d5953e631b89569c5c5b6d468e9b387a78b1634fba27313b141
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pypowsybl-1.17.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 62.1 MB |
| Tags | CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
fea364d55a4116cda9eec1bec09faa88f266d0978571697dc975722a8267f2b3
|
|
BLAKE2b-256 checksum How to use checksums |
86ccf1913b212c682b2aa3dd89d14b7c15fbeb31ce10bf87c14e94b36874372a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pypowsybl-1.17.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 58.1 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5f3d43f8230a7b60ce9b69b9a34598c5cdcb96321cdefbea15bd8be96b6860f4
|
|
BLAKE2b-256 checksum How to use checksums |
82b1ab80d5f7e532ba51a6119548ccba63cb3be73d4191a13d8a7c5a7eb20446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp311-cp311-win_amd64.whl
| Download URL | pypowsybl-1.17.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 54.9 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b14604f63974b6081d42a7996aee2b6ed2f5b3bc4d1949f5c7acb91fba83ba15
|
|
BLAKE2b-256 checksum How to use checksums |
e858fbadeb6b32b4a5e3499bdbd723a993c947d0e386c6fc2c57246f59ddab39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pypowsybl-1.17.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 69.4 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
71f3a12fd93e352bba00e9f78a4d8588028ab1c040f1df589ec7d96d39f75e40
|
|
BLAKE2b-256 checksum How to use checksums |
05a51a906e918143ee3afb7f8c26408057a3a68b09a2dc6309798eacfb473c15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pypowsybl-1.17.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 62.1 MB |
| Tags | CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
d58d53ed45246576c1e0cc4fc7054eb9c4c38150cab76ca3065b0134791a0c33
|
|
BLAKE2b-256 checksum How to use checksums |
170614f7da804d91d2bc0daf363772f2ee5aaba9d650276afc94a22e0c852e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | pypowsybl-1.17.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 58.1 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2183e969e3dd9d60a1446fb925a1ca26926f74ceaaa0e84c90eac635228a0e64
|
|
BLAKE2b-256 checksum How to use checksums |
e86fa8c147c98c1f6df90113a100133b88fa54206002a43d220068a572e137d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp310-cp310-win_amd64.whl
| Download URL | pypowsybl-1.17.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 54.9 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5e54261d15b48250f3c1554be6cf8356d451c0dc10fe9b6d63b4090048a6c4e3
|
|
BLAKE2b-256 checksum How to use checksums |
71783c8652c675cdaebe852c0539f1f7cff7ff61f862c57f4aa11aeea59ba64b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pypowsybl-1.17.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 69.4 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9fa9481ad1da565563c34afa7ceef64d0b565bf75e96ff35e01811a376b44a80
|
|
BLAKE2b-256 checksum How to use checksums |
18d44d4de1dedf178c634979213013d148dee705f4d0da675923d2814a14c3b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pypowsybl-1.17.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 62.1 MB |
| Tags | CPython 3.10 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
796aff91168172925fdd226bf2228368514fd171cb718bfa4b4a8217143b17aa
|
|
BLAKE2b-256 checksum How to use checksums |
c4aecb8c018ea80ecf3a512c0a42d3f9b66b6ade9d33690d5fe28971b862ab74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / pypowsybl-1.17.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | pypowsybl-1.17.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 58.1 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9ed946f08c989724078ebe4a95fe2f76cd33130f27448725ad526c29bad67e48
|
|
BLAKE2b-256 checksum How to use checksums |
cfcc8f5901f90996d452a5b4516072fe6a23b5dbc8a70702fcd3f3650dad1fb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for pypowsybl 1.17.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.