Skip to main content

Welcome to PyPowSyBl

PyPowSyBl is a Python library that provides access to the PowSyBl Java framework for power system analysis. Built on GraalVM native image technology, it delivers high-performance power grid modeling and simulation capabilities directly to Python developers.

Quick Start

Get up and running with PyPowSyBl in minutes

Installation

Install PyPowSyBl for your platform

User Guide

Learn core concepts and workflows

API Reference

Explore the complete API documentation

Key Features

PyPowSyBl provides comprehensive power system analysis capabilities:

Network Modeling

Create and manipulate power network models with substations, generators, lines, transformers, and more

Load Flow Analysis

Run AC and DC load flow calculations using OpenLoadFlow or DynaFlow

Security Analysis

Simulate contingencies and analyze system security with N-1 analysis

Sensitivity Analysis

Calculate sensitivity factors for power system optimization

Short-Circuit Analysis

Compute short-circuit currents for fault analysis

Dynamic Simulation

Perform time-domain dynamic simulations with Dynawo

Multiple Formats

Import and export networks in CGMES, XIIDM, PSS/E, MATPOWER, and more

Visualization

Generate network diagrams with single-line and network area diagrams

Use Cases

PyPowSyBl is designed for power system engineers, researchers, and data scientists working on:
  • Grid Operations: Load flow analysis, contingency analysis, and operational planning
  • System Planning: Network expansion studies and capacity analysis
  • Research: Power system modeling, algorithm development, and academic research
  • Machine Learning: Grid2Op integration for reinforcement learning applications
  • Standards Compliance: CGMES and CIM standard support for European grid operators

What Makes PyPowSyBl Unique

Built on GraalVM native image technology, PyPowSyBl compiles Java code to native libraries for fast execution without JVM overhead.
Based on the mature PowSyBl framework used by European transmission system operators like RTE (France) and Elia (Belgium).
Covers the full power system analysis workflow from network creation to advanced simulations.
Full Python integration with pandas DataFrames, type hints, and Pythonic APIs.
First-class support for CGMES, CIM, and other international power system data standards.

Simple Example

Get started with a basic load flow calculation:
import pypowsybl as pp

# Create an IEEE 14-bus test network
network = pp.network.create_ieee14()

# Run an AC load flow
results = pp.loadflow.run_ac(network)
print(results)

# Get bus voltages as a pandas DataFrame
buses = network.get_buses()
print(buses[['v_mag', 'v_angle']])

Next Steps

Installation Guide

Install PyPowSyBl on Linux, macOS, or Windows

Quickstart Tutorial

Run your first load flow calculation

Network Guide

Learn how to create and manipulate networks

Examples

Explore practical examples and use cases

Community and Support

PyPowSyBl requires Python 3.9 or later and is available for Linux, macOS, and Windows on both amd64 and arm64 architectures.

Build docs developers (and LLMs) love