pypowsybl

A PowSyBl and Python integration based on GraalVM native image

https://github.com/powsybl/pypowsybl

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary

Keywords

cgmes load-flow loadflow power-flow power-system power-system-analysis power-system-simulation powerflow python
Last synced: 6 months ago · JSON representation

Repository

A PowSyBl and Python integration based on GraalVM native image

Basic Info
  • Host: GitHub
  • Owner: powsybl
  • License: mpl-2.0
  • Language: Java
  • Default Branch: main
  • Homepage:
  • Size: 12.5 MB
Statistics
  • Stars: 68
  • Watchers: 20
  • Forks: 14
  • Open Issues: 95
  • Releases: 51
Topics
cgmes load-flow loadflow power-flow power-system power-system-analysis power-system-simulation powerflow python
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

PyPowSyBl

PyPI Latest Release Documentation Status MPL-2.0 License Slack Actions Status

Python code quality : Quality Gate Status (python) Coverage

Java code quality : Quality Gate Status (java)

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.9 to 3.13, on Linux, Windows and MacOS.

First, make sure you have an up-to-date version of pip and setuptools: bash pip install --upgrade setuptools pip

Then you can install PyPowSyBl using pip: bash pip install pypowsybl

Getting started

First, we have to import pypowsybl: python import pypowsybl as pp

We can create an IEEE 14 buses network and run a load flow computation: python n = pp.network.create_ieee14() results = pp.loadflow.run_ac(n) print(results)

bash [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: python buses = n.get_buses() print(buses)

bash 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.9 for Linux, Windows and MacOS (amd64 and arm64)
  • Oracle GraalVM Java 17

To build from sources and install PyPowSyBl package:

bash 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:

```bash 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:

bash pytest tests

To run static type checking with mypy: bash mypy -p pypowsybl

To run linting inspection with pylint: bash pylint pypowsybl

Owner

  • Name: PowSyBl
  • Login: powsybl
  • Kind: organization

Power System Blocks

GitHub Events

Total
  • Fork event: 4
  • Create event: 138
  • Release event: 5
  • Issues event: 68
  • Watch event: 14
  • Delete event: 112
  • Member event: 5
  • Issue comment event: 1,071
  • Push event: 791
  • Gollum event: 2
  • Pull request review comment event: 117
  • Pull request event: 236
  • Pull request review event: 230
Last Year
  • Fork event: 4
  • Create event: 138
  • Release event: 5
  • Issues event: 68
  • Watch event: 14
  • Delete event: 112
  • Member event: 5
  • Issue comment event: 1,071
  • Push event: 791
  • Gollum event: 2
  • Pull request review comment event: 117
  • Pull request event: 236
  • Pull request review event: 230

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 772
  • Total Committers: 34
  • Avg Commits per committer: 22.706
  • Development Distribution Score (DDS): 0.703
Past Year
  • Commits: 173
  • Committers: 19
  • Avg Commits per committer: 9.105
  • Development Distribution Score (DDS): 0.665
Top Committers
Name Email Commits
Geoffroy Jamgotchian g****n@r****m 229
EtienneLt 3****t 168
Sylvain Leclerc s****c@r****m 100
HugoKulesza 9****a 71
Coline Piloquet 5****t 32
Bertrand Rix b****x@g****m 26
Christian Biasuzzi c****i@s****t 25
jeandemanged d****e@a****m 24
yichen88 3****8 21
Sophie Frasnedo 9****s 13
Florian Dupuy 6****p 10
Choco 9****t 6
Lisrte l****l@r****m 6
Naledi 1****8 4
OpenSuze 4****e 4
alicecaron a****n@r****m 4
Clément Leclerc c****c@r****m 3
Olivier Perrin o****n@r****m 3
Peter Mitri p****i@r****m 3
DONNOT Benjamin b****t@r****m 3
Nicolas Pierre 1****r 2
Nicolas Rol n****l@r****m 2
phiedw p****s@r****m 2
pjeanmarie 7****e 1
p-arvy 1****y 1
Thomas ADAM 5****0 1
Sylvestre Prabakaran s****n@g****m 1
Michał Marszal f****l 1
Mathieu BAGUE m****e@g****m 1
Massimo Ferraro m****o@t****u 1
and 4 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 128
  • Total pull requests: 681
  • Average time to close issues: 6 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 40
  • Total pull request authors: 34
  • Average comments per issue: 1.39
  • Average comments per pull request: 1.03
  • Merged pull requests: 522
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 63
  • Pull requests: 314
  • Average time to close issues: 16 days
  • Average time to close pull requests: 13 days
  • Issue authors: 24
  • Pull request authors: 20
  • Average comments per issue: 0.46
  • Average comments per pull request: 1.66
  • Merged pull requests: 235
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sylvlecl (21)
  • HugoKulesza (16)
  • AnkurArohi (10)
  • BDonnot (10)
  • alicecaron (8)
  • nicow-elia (7)
  • jeandemanged (5)
  • EtienneLt (4)
  • gautierbureau (4)
  • unetablettedechocolat (3)
  • colinepiloquet (3)
  • geofjamg (3)
  • So-Fras (2)
  • LeonHilf (2)
  • tso-martin (2)
Pull Request Authors
  • geofjamg (154)
  • EtienneLt (128)
  • HugoKulesza (119)
  • jeandemanged (46)
  • colinepiloquet (41)
  • obrix (33)
  • CBiasuzzi (23)
  • So-Fras (20)
  • Lisrte (16)
  • unetablettedechocolat (11)
  • nao1345678 (11)
  • rolnico (10)
  • flo-dup (8)
  • AnkurArohi (7)
  • alicecaron (7)
Top Labels
Issue Labels
bug (29) enhancement (11) Release 06/2025 (7) status: needs-design (2) status: in-progress (2) documentation (2) PR: next-release (2) Release 09/2025 (2) help wanted (1) Epic (1) Release 03/2025 (1)
Pull Request Labels
status: ready to be merged (106) status: ready-for-review (47) PR: next-release (44) documentation (27) breaking change (26) Release 06/2025 (26) bug (24) Release 03/2025 (20) December 2024 release (13) Release 09/2025 (5) do not merge (5) status: in-progress (4) help wanted (2) wontfix (1) status: needs-design (1) enhancement (1) status: does not compile (1) status: conflict with main (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 7,077 last-month
  • Total dependent packages: 4
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 126
  • Total maintainers: 3
proxy.golang.org: github.com/powsybl/pypowsybl
  • Versions: 48
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: pypowsybl

A PowSyBl Python API

  • Versions: 42
  • Dependent Packages: 4
  • Dependent Repositories: 1
  • Downloads: 7,077 Last month
Rankings
Downloads: 6.6%
Dependent packages count: 7.3%
Stargazers count: 10.5%
Average: 11.8%
Forks count: 12.6%
Dependent repos count: 22.1%
Last synced: 6 months ago
repo1.maven.org: com.powsybl:pypowsybl

A C interface to powsybl, for pypowsybl implementation

  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 23.9%
Forks count: 29.0%
Dependent repos count: 32.0%
Average: 33.4%
Dependent packages count: 48.9%
Last synced: 6 months ago

Dependencies

java/pom.xml maven
  • 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
requirements.txt pypi
  • 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
setup.py pypi
  • networkx *
  • pandas *
  • prettytable *
.github/workflows/dev-ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • graalvm/setup-graalvm v1 composite
  • sonarsource/sonarcloud-github-action v1.6 composite
.github/workflows/full-ci.yml actions
  • 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