{"id":13721515,"url":"https://github.com/powsybl/pypowsybl","last_synced_at":"2025-04-04T12:08:42.283Z","repository":{"id":37097354,"uuid":"311302907","full_name":"powsybl/pypowsybl","owner":"powsybl","description":"A PowSyBl and Python integration based on GraalVM native image","archived":false,"fork":false,"pushed_at":"2024-10-29T14:09:56.000Z","size":8051,"stargazers_count":56,"open_issues_count":68,"forks_count":12,"subscribers_count":19,"default_branch":"main","last_synced_at":"2024-10-29T15:06:17.311Z","etag":null,"topics":["cgmes","load-flow","loadflow","power-flow","power-system","power-system-analysis","power-system-simulation","powerflow","python"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/powsybl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-09T10:30:33.000Z","updated_at":"2024-10-29T14:09:58.000Z","dependencies_parsed_at":"2024-01-18T10:25:46.831Z","dependency_job_id":"31ba74e3-632c-4056-a175-64f17548ba54","html_url":"https://github.com/powsybl/pypowsybl","commit_stats":{"total_commits":643,"total_committers":30,"mean_commits":"21.433333333333334","dds":0.6951788491446345,"last_synced_commit":"52cb6081837f7922b7889e6bbe5ecfd6182f17a5"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powsybl%2Fpypowsybl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powsybl%2Fpypowsybl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powsybl%2Fpypowsybl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powsybl%2Fpypowsybl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/powsybl","download_url":"https://codeload.github.com/powsybl/pypowsybl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245020313,"owners_count":20548155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgmes","load-flow","loadflow","power-flow","power-system","power-system-analysis","power-system-simulation","powerflow","python"],"created_at":"2024-08-03T01:01:18.054Z","updated_at":"2025-03-28T11:08:48.220Z","avatar_url":"https://github.com/powsybl.png","language":"Java","funding_links":[],"categories":["Energy Systems"],"sub_categories":["Energy System Modeling Frameworks"],"readme":"# PyPowSyBl\n\n[![PyPI Latest Release](https://img.shields.io/pypi/v/pypowsybl.svg)](https://pypi.org/project/pypowsybl/)\n[![Documentation Status](https://readthedocs.org/projects/pypowsybl/badge/?version=latest)](https://pypowsybl.readthedocs.io/en/latest/?badge=latest)\n[![MPL-2.0 License](https://img.shields.io/badge/license-MPL_2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)\n[![Slack](https://img.shields.io/badge/slack-powsybl-blueviolet.svg?logo=slack)](https://join.slack.com/t/powsybl/shared_invite/zt-rzvbuzjk-nxi0boim1RKPS5PjieI0rA)\n[![Actions Status](https://github.com/powsybl/pypowsybl/workflows/Full%20CI/badge.svg)](https://github.com/powsybl/pypowsybl/actions)\n\nPython code quality :\n[![Quality Gate Status (python)](https://sonarcloud.io/api/project_badges/measure?project=powsybl_pypowsybl\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=powsybl_pypowsybl)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=powsybl_pypowsybl\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=powsybl_pypowsybl)\n\nJava code quality :\n[![Quality Gate Status (java)](https://sonarcloud.io/api/project_badges/measure?project=powsybl_pypowsybl-java\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=powsybl_pypowsybl-java)\n\nThe PyPowSyBl project gives access PowSyBl Java framework to Python developers. This Python integration relies on\nGraalVM to compile Java code to a native library.\n\n## Documentation\n\nLatest version of the documentation with API reference and many code samples is [here](https://pypowsybl.readthedocs.io/).  \n\nTo contribute to the documentation follow the instructions in the [documentation README](https://github.com/powsybl/pypowsybl/blob/main/docs/README.md) page.\n\n## Notebooks\n\nNotebooks demonstrating PyPowSyBl features can be found in this [repository](https://github.com/powsybl/pypowsybl-notebooks).\n\n## Installation\n\nPyPowSyBl is released on [PyPi](https://pypi.org/project/pypowsybl/) for Python 3.8 to 3.12, on Linux, Windows and MacOS.\n\nFirst, make sure you have an up-to-date version of pip and setuptools:\n```bash\npip install --upgrade setuptools pip\n```\n\nThen you can install PyPowSyBl using pip:\n```bash\npip install pypowsybl\n```\n\n## Getting started\n\nFirst, we have to import pypowsybl:\n```python\nimport pypowsybl as pp\n```\n\nWe can create an IEEE 14 buses network and run a load flow computation:\n```python\nn = pp.network.create_ieee14()\nresults = pp.loadflow.run_ac(n)\nprint(results)\n```\n\n```bash\n[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)]\n```\n\nWe can now get buses data (like any other network elements) as a [Pandas](https://pandas.pydata.org/) dataframe:\n```python\nbuses = n.get_buses()\nprint(buses)\n```\n\n```bash\n        v_mag  v_angle\nVL1_0   1.060     0.00\nVL2_0   1.045    -4.98\nVL3_0   1.010   -12.72\nVL4_0   1.019   -10.33\nVL5_0   1.020    -8.78\nVL6_0   1.070   -14.22\nVL7_0   1.062   -13.37\nVL8_0   1.090   -13.36\nVL9_0   1.056   -14.94\nVL10_0  1.051   -15.10\nVL11_0  1.057   -14.79\nVL12_0  1.055   -15.07\nVL13_0  1.050   -15.16\nVL14_0  1.036   -16.04\n```\n\nThis is just a quick appetizer of PyPowSyBl features. PyPowsybl provides a lot more features:\nsecurity analysis, sensitivity analysis, handling of multiple file formats (including CGMES),\nsubstation and network diagrams generation, ...\nFor more details and examples, go to the documentation and Jupyter notebooks.\n\n## Build from sources\n\nThat section is intended for developers who wish to build pypowsybl from the sources in this repository.\n\nRequirements:\n\n- Maven \u003e= 3.1\n- Cmake \u003e= 3.20\n- C++11 compiler\n- Python \u003e= 3.8 for Linux, Windows and MacOS (amd64 and arm64)\n- [Oracle GraalVM Java 17](https://www.graalvm.org/downloads/)\n\nTo build from sources and install PyPowSyBl package:\n\n```bash\ngit clone https://github.com/powsybl/pypowsybl.git\nexport JAVA_HOME=\u003cpath to GraalVM\u003e\npip install --upgrade setuptools pip\npip install -r requirements.txt\npip install .\n```\n\nWhile developing, you may find it convenient to use the developer (or editable)\nmode of installation:\n\n```bash\npip install -e .\n# or, to build the C extension with debug symbols:\npython setup.py build --debug develop --user\n```\n\nPlease refer to pip and setuptools documentations for more information.\n\nTo run unit tests:\n\n```bash\npytest tests\n```\n\nTo run static type checking with `mypy`:\n```bash\nmypy -p pypowsybl\n```\n\nTo run linting inspection with `pylint`:\n```bash\npylint pypowsybl\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowsybl%2Fpypowsybl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowsybl%2Fpypowsybl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowsybl%2Fpypowsybl/lists"}