PyPowSyBl
A Python library for modelling and simulating power grids by providing bindings to the powsybl Java framework.
https://github.com/powsybl/pypowsybl
Category: Energy Systems
Sub Category: Energy System Modeling Frameworks
Keywords
cgmes load-flow loadflow power-flow power-system power-system-analysis power-system-simulation powerflow python
Keywords from Contributors
power-systems energy-system powsybl cim extensible groovy modular klu user-stories single-line-diagram
Last synced: 10 minutes ago
JSON representation
Repository metadata
A PowSyBl and Python integration based on GraalVM native image
- Host: GitHub
- URL: https://github.com/powsybl/pypowsybl
- Owner: powsybl
- License: mpl-2.0
- Created: 2020-11-09T10:30:33.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2026-11-03T18:03:22.000Z (1 day ago)
- Last Synced: 2026-11-04T07:03:58.450Z (1 day ago)
- Topics: cgmes, load-flow, loadflow, power-flow, power-system, power-system-analysis, power-system-simulation, powerflow, python
- Language: Java
- Homepage:
- Size: 14.1 MB
- Stars: 106
- Watchers: 18
- Forks: 30
- Open Issues: 109
- Releases: 56
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
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, Windows and MacOS.
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, Windows and MacOS (amd64 and arm64)
- 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 run unit tests:
pytest tests
To run static type checking with mypy:
mypy -p pypowsybl
To run linting inspection with pylint:
pylint pypowsybl
Owner metadata
- Name: PowSyBl
- Login: powsybl
- Email:
- Kind: organization
- Description: Power System Blocks
- Website: https://www.powsybl.org
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/29916668?v=4
- Repositories: 52
- Last ynced at: 2026-10-30T08:06:54.223Z
- Profile URL: https://github.com/powsybl
GitHub Events
Total
- Create event: 184
- Delete event: 153
- Fork event: 5
- Gollum event: 2
- Issue comment event: 1203
- Issues event: 101
- Member event: 5
- Pull request event: 292
- Pull request review comment event: 131
- Pull request review event: 269
- Push event: 1060
- Release event: 6
- Watch event: 21
Last Year
- Create event: 40
- Delete event: 39
- Fork event: 1
- Issue comment event: 85
- Issues event: 25
- Pull request event: 44
- Pull request review comment event: 12
- Pull request review event: 35
- Push event: 243
- Release event: 1
- Watch event: 6
Committers metadata
Last synced: 1 day ago
Total Commits: 936
Total Committers: 48
Avg Commits per committer: 19.5
Development Distribution Score (DDS): 0.75
Commits in past year: 121
Committers in past year: 24
Avg Commits per committer in past year: 5.042
Development Distribution Score (DDS) in past year: 0.579
| Name | Commits | |
|---|---|---|
| Geoffroy Jamgotchian | g****n@r****m | 234 |
| EtienneLt | 3****t | 168 |
| HugoKulesza | h****a@r****m | 141 |
| Sylvain Leclerc | s****c@r****m | 100 |
| Bertrand Rix | b****x@a****m | 36 |
| Coline Piloquet | 5****t | 33 |
| Christian Biasuzzi | c****i@s****t | 29 |
| jeandemanged | d****e@a****m | 25 |
| Lisrte | l****e@r****m | 24 |
| yichen88 | 3****8 | 21 |
| Sophie Frasnedo | 9****s | 14 |
| Florian Dupuy | 6****p | 12 |
| Nicolas Rol | n****l@r****m | 11 |
| Gautier Bureau | g****u@r****m | 8 |
| nicow-elia | 1****a | 8 |
| Thomas Bouquet | t****t@r****m | 7 |
| Choco | 9****t | 6 |
| CARON Alice | a****n@r****m | 6 |
| Naledi | 1****8 | 4 |
| Olivier Perrin | o****n@r****m | 4 |
| OpenSuze | 4****e | 4 |
| Clément Leclerc | c****c@r****m | 3 |
| Peter Mitri | p****i@r****m | 3 |
| thomas-durand-SGI | t****d@s****m | 3 |
| DONNOT Benjamin | b****t@r****m | 3 |
| Landry Huet | l****t@s****m | 2 |
| Nicolas Pierre | 1****r | 2 |
| pawellytaev | 8****v | 2 |
| Sylvestre Prabakaran | s****n@r****m | 2 |
| Godelaine | g****n@r****m | 2 |
| and 18 more... | ||
Committer domains:
- rte-france.com: 17
- supergrid-institute.com: 3
- artelys.com: 2
- techrain.eu: 1
- soft.it: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 177
Total pull requests: 826
Average time to close issues: 6 months
Average time to close pull requests: 21 days
Total issue authors: 52
Total pull request authors: 47
Average comments per issue: 1.15
Average comments per pull request: 1.27
Merged pull request: 612
Bot issues: 0
Bot pull requests: 0
Past year issues: 37
Past year pull requests: 118
Past year average time to close issues: 3 months
Past year average time to close pull requests: 17 days
Past year issue authors: 19
Past year pull request authors: 23
Past year average comments per issue: 0.54
Past year average comments per pull request: 2.27
Past year merged pull request: 76
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sylvlecl (22)
- HugoKulesza (21)
- alicecaron (11)
- BDonnot (10)
- AnkurArohi (10)
- nicow-elia (9)
- bqth29 (8)
- terriervik (6)
- jeandemanged (6)
- EtienneLt (4)
- SGI-Landry (4)
- gautierbureau (4)
- LeonHilf (3)
- unetablettedechocolat (3)
- geofjamg (3)
Top Pull Request Authors
- HugoKulesza (167)
- geofjamg (154)
- EtienneLt (128)
- jeandemanged (47)
- obrix (43)
- colinepiloquet (40)
- Lisrte (30)
- CBiasuzzi (25)
- So-Fras (20)
- rolnico (17)
- gautierbureau (16)
- bqth29 (13)
- unetablettedechocolat (11)
- nao1345678 (11)
- nicow-elia (11)
Top Issue Labels
- bug (41)
- rao (14)
- enhancement (11)
- Release 06/2025 (8)
- Release 06/2026 (7)
- Release 09/2025 (7)
- Release 03/2026 (4)
- documentation (4)
- Release 03/2025 (2)
- status: needs-design (2)
- PR: next-release (2)
- status: in-progress (2)
- help wanted (1)
- Release 12/2025 (1)
- Epic (1)
- breaking change (1)
- Release 09/2026 (1)
- December 2024 release (1)
Top Pull Request Labels
- status: ready to be merged (106)
- status: ready-for-review (49)
- PR: next-release (44)
- breaking change (35)
- documentation (28)
- Release 06/2026 (27)
- Release 06/2025 (25)
- bug (24)
- Release 03/2025 (21)
- Release 09/2025 (16)
- Release 09/2026 (14)
- December 2024 release (13)
- rao (12)
- Release 03/2026 (11)
- waiting for powsybl-dependencies (7)
- Release 12/2025 (4)
- status: in-progress (4)
- do not merge (3)
- enhancement (3)
- deprecated (3)
- help wanted (2)
- needs_core_rc (1)
- status: conflict with main (1)
- status: does not compile (1)
- wontfix (1)
- status: needs-design (1)
Package metadata
- Total packages: 6
-
Total downloads:
- pypi: 24,560 last-month
- Total dependent packages: 4 (may contain duplicates)
- Total dependent repositories: 1 (may contain duplicates)
- Total versions: 249
- Total maintainers: 2
proxy.golang.org: github.com/Powsybl/pypowsybl
- Homepage:
- Documentation: https://pkg.go.dev/github.com/Powsybl/pypowsybl#section-documentation
- Licenses: mpl-2.0
- Latest release: v1.16.1 (published 4 months ago)
- Last Synced: 2026-11-04T07:12:06.155Z (1 day ago)
- Versions: 53
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 4.568%
- Average: 4.721%
- Dependent repos count: 4.875%
proxy.golang.org: github.com/powsybl/PyPowSyBl
- Homepage:
- Documentation: https://pkg.go.dev/github.com/powsybl/PyPowSyBl#section-documentation
- Licenses: mpl-2.0
- Latest release: v1.16.1 (published 4 months ago)
- Last Synced: 2026-11-04T07:12:05.044Z (1 day ago)
- Versions: 53
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 4.568%
- Average: 4.721%
- Dependent repos count: 4.875%
proxy.golang.org: github.com/powsybl/pypowsybl
- Homepage:
- Documentation: https://pkg.go.dev/github.com/powsybl/pypowsybl#section-documentation
- Licenses: mpl-2.0
- Latest release: v1.16.1 (published 4 months ago)
- Last Synced: 2026-11-04T07:12:06.495Z (1 day ago)
- Versions: 53
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
pypi.org: pypowsybl
A PowSyBl Python API
- Homepage: https://github.com/powsybl/pypowsybl
- Documentation: https://pypowsybl.readthedocs.io/
- Licenses: MPL-2.0
- Latest release: 1.16.1 (published 4 months ago)
- Last Synced: 2026-11-04T07:12:03.484Z (1 day ago)
- Versions: 47
- Dependent Packages: 4
- Dependent Repositories: 1
- Downloads: 24,560 Last month
-
Rankings:
- Downloads: 6.618%
- Dependent packages count: 7.303%
- Stargazers count: 10.458%
- Average: 11.81%
- Forks count: 12.604%
- Dependent repos count: 22.068%
- Maintainers (2)
repo1.maven.org: com.powsybl:pypowsybl
A C interface to powsybl, for pypowsybl implementation
- Homepage: https://www.powsybl.org
- Documentation: https://appdoc.app/artifact/com.powsybl/pypowsybl/
- Licenses: Mozilla Public License, Version 2.0
- Latest release: 1.16.1 (published about 2 months ago)
- Last Synced: 2026-11-04T07:52:55.819Z (about 24 hours ago)
- Versions: 37
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 23.871%
- Forks count: 29.031%
- Dependent repos count: 31.98%
- Average: 33.435%
- Dependent packages count: 48.86%
repo1.maven.org: com.powsybl:pypowsybl-parent
PyPowSyBl Java part parent project
- Homepage: https://www.powsybl.org
- Documentation: https://appdoc.app/artifact/com.powsybl/pypowsybl-parent/
- Licenses: Mozilla Public License, Version 2.0
- Latest release: 1.16.1 (published about 2 months ago)
- Last Synced: 2026-11-04T07:45:30.166Z (about 24 hours ago)
- Versions: 6
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 27.851%
- Average: 33.834%
- Dependent packages count: 39.818%
Dependencies
- ch.qos.logback:logback-classic 1.2.3 compile
- ch.qos.logback:logback-core 1.2.3 compile
- com.powsybl:powsybl-ieee-cdf-converter compile
- com.powsybl:powsybl-dependencies 1.2.0 import
- org.graalvm.nativeimage:svm 21.3.0 provided
- org.graalvm.sdk:graal-sdk 21.3.0 provided
- com.powsybl:powsybl-cgmes-conformity
- com.powsybl:powsybl-cgmes-conversion
- com.powsybl:powsybl-cgmes-model
- com.powsybl:powsybl-config-classic
- com.powsybl:powsybl-glsk-document-ucte
- com.powsybl:powsybl-iidm-api
- com.powsybl:powsybl-iidm-impl
- com.powsybl:powsybl-iidm-reducer
- com.powsybl:powsybl-iidm-test
- com.powsybl:powsybl-iidm-xml-converter
- com.powsybl:powsybl-loadflow-api
- com.powsybl:powsybl-math-native 1.2.1
- com.powsybl:powsybl-matpower-converter
- com.powsybl:powsybl-network-area-diagram
- com.powsybl:powsybl-open-loadflow
- com.powsybl:powsybl-powerfactory-converter
- com.powsybl:powsybl-powerfactory-dgs
- com.powsybl:powsybl-psse-converter
- com.powsybl:powsybl-single-line-diagram-core
- com.powsybl:powsybl-tools
- com.powsybl:powsybl-triple-store-impl-rdf4j
- com.powsybl:powsybl-ucte-converter
- org.apache.commons:commons-collections4 4.4
- org.codehaus.janino:janino 3.1.0
- org.mapdb:mapdb 3.0.8
- org.slf4j:log4j-over-slf4j 1.7.30
- com.powsybl:powsybl-commons test
- com.powsybl:powsybl-math-native test
- org.assertj:assertj-core 3.11.0 test
- org.junit.jupiter:junit-jupiter-engine 5.5.2 test
- coverage ==5.5
- matplotlib *
- mypy ==0.931
- networkx *
- pandas ==1.3.5
- pandas-stubs ==1.2.0.47
- prettytable ==2.0.0
- pydata-sphinx-theme ==0.6.3
- pylint ==2.12.2
- pytest >=6.2.5
- sphinx ==4.2.0
- wheel ==0.37.1
- networkx *
- pandas *
- prettytable *
- actions/checkout v3 composite
- actions/setup-python v4 composite
- graalvm/setup-graalvm v1 composite
- sonarsource/sonarcloud-github-action v1.6 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- graalvm/setup-graalvm v1 composite
- sonarsource/sonarcloud-github-action v1.6 composite
- SonarSource/sonarqube-scan-action 299e4b793aaa83bf2aba7c9c14bedbb485688ec4 composite
- actions/checkout de0fac2e4500dabe0009e67214ff5f5447ce83dd composite
- actions/download-artifact 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c composite
- actions/github-script ed597411d8f924073f98dfc5c65a23a2325f34cd composite
- actions/setup-java be666c2fcd27ec809703dec50e508c2fdc7f6654 composite
- furo ==2025.12.19
- llvmlite *
- networkx *
- pandapower >=2.14.11
- pandas >=2.2.3
- prettytable >=2.0.0
- pyoptinterface ==0.6.1
- sphinx ==9.0.4
- sphinx ==8.1.3
- tabulate ==0.9.0
- tccbox *
- actions/checkout de0fac2e4500dabe0009e67214ff5f5447ce83dd composite
- actions/download-artifact 3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c composite
- actions/setup-python a309ff8b426b58ec0e2a45f0f869d46889d02405 composite
- actions/upload-artifact bbbca2ddaa5d8feaa63e36b76fdaad77386f024f composite
- graalvm/setup-graalvm 60c26726de13f8b90771df4bc1641a52a3159994 composite
- slackapi/slack-github-action 91efab103c0de0a537f72a35f6b8cda0ee76bf0a composite
- ./.github/actions/setup-before-build * composite
- actions/checkout de0fac2e4500dabe0009e67214ff5f5447ce83dd composite
- actions/setup-java be666c2fcd27ec809703dec50e508c2fdc7f6654 composite
- actions/upload-artifact bbbca2ddaa5d8feaa63e36b76fdaad77386f024f composite
- ch.qos.logback:logback-classic * compile
- ch.qos.logback:logback-core * compile
- com.powsybl:powsybl-ieee-cdf-converter * compile
- org.graalvm.nativeimage:svm 23.1.2 provided
- org.graalvm.sdk:nativeimage 23.1.2 provided
- com.github.luben:zstd-jni *
- com.google.re2j:re2j *
- com.powsybl:open-rao-crac-api *
- com.powsybl:open-rao-crac-impl *
- com.powsybl:open-rao-crac-io-cim *
- com.powsybl:open-rao-crac-io-cse *
- com.powsybl:open-rao-crac-io-fb-constraint *
- com.powsybl:open-rao-crac-io-json *
- com.powsybl:open-rao-crac-io-nc *
- com.powsybl:open-rao-monitoring *
- com.powsybl:open-rao-rao-api *
- com.powsybl:open-rao-rao-result-json *
- com.powsybl:open-rao-search-tree-rao *
- com.powsybl:powsybl-ampl-converter *
- com.powsybl:powsybl-cgmes-conformity *
- com.powsybl:powsybl-cgmes-conversion *
- com.powsybl:powsybl-cgmes-extensions *
- com.powsybl:powsybl-cgmes-gl *
- com.powsybl:powsybl-cgmes-model *
- com.powsybl:powsybl-config-classic *
- com.powsybl:powsybl-dynaflow *
- com.powsybl:powsybl-dynawo-extensions-api *
- com.powsybl:powsybl-dynawo-extensions-impl *
- com.powsybl:powsybl-dynawo-extensions-serde *
- com.powsybl:powsybl-dynawo-simulation *
- com.powsybl:powsybl-entsoe-commons *
- com.powsybl:powsybl-flow-decomposition *
- com.powsybl:powsybl-glsk-document-ucte *
- com.powsybl:powsybl-iidm-api *
- com.powsybl:powsybl-iidm-geodata *
- com.powsybl:powsybl-iidm-impl *
- com.powsybl:powsybl-iidm-modification *
- com.powsybl:powsybl-iidm-reducer *
- com.powsybl:powsybl-iidm-serde *
- com.powsybl:powsybl-iidm-test *
- com.powsybl:powsybl-loadflow-api *
- com.powsybl:powsybl-loadflow-results-completion *
- com.powsybl:powsybl-matpower-converter *
- com.powsybl:powsybl-network-area-diagram *
- com.powsybl:powsybl-open-loadflow *
- com.powsybl:powsybl-open-reac ${powsybl-open-reac.version}
- com.powsybl:powsybl-powerfactory-converter *
- com.powsybl:powsybl-powerfactory-dgs *
- com.powsybl:powsybl-psse-converter *
- com.powsybl:powsybl-shortcircuit-api *
- com.powsybl:powsybl-single-line-diagram-cgmes-layout *
- com.powsybl:powsybl-single-line-diagram-core *
- com.powsybl:powsybl-tools *
- com.powsybl:powsybl-triple-store-impl-rdf4j *
- com.powsybl:powsybl-ucte-converter *
- org.apache.commons:commons-collections4 4.4
- org.apache.commons:commons-csv *
- org.codehaus.janino:janino 3.1.0
- org.mapdb:mapdb 3.0.8
- org.slf4j:log4j-over-slf4j *
- com.powsybl:powsybl-commons-test * test
- com.powsybl:powsybl-math-native * test
- org.assertj:assertj-core * test
- org.awaitility:awaitility * test
- actions/cache 27d5ce7f107fe9357f9df03efb73ab90386fccae composite
- actions/setup-python a309ff8b426b58ec0e2a45f0f869d46889d02405 composite
- graalvm/setup-graalvm 60c26726de13f8b90771df4bc1641a52a3159994 composite
Score: 19.35099839697385