--- id: power-grid-model version: "1.13.142" license: MPL-2.0 license_treatment: copyleft maintenance: active --- # power-grid-model — Python/C++ library for distribution power system analysis License: copyleft · Maintenance: active · Downloads: 152.0K/mo ## What it is and what it does Power Grid Model is a production-grade library for analyzing electrical distribution networks. The core is implemented in C++ for performance, with a Python interface for ease of use. It handles three main types of steady-state power system calculations: power flow (determining voltages and currents), state estimation (inferring grid state from measurements), and short circuit analysis (computing fault currents). The library depends only on numpy and is distributed as pre-compiled wheels for most platforms, making installation straightforward despite its compiled nature. Developers use it to model and analyze distribution grids—the lower-voltage networks that deliver power to neighborhoods and industrial sites. It's aimed at researchers, engineers, and developers working on grid planning, operation, or optimization. The project is actively maintained under the LF Energy umbrella and includes documentation and examples for common workflows. Use it for: - Run power flow studies to determine steady-state voltages and currents in a distribution network - Perform state estimation to infer grid conditions from real-world measurement data - Analyze short circuit faults to size protective equipment and validate grid resilience - Validate input data and export results for integration with other grid analysis tools - Build grid optimization or planning workflows that require repeated steady-state calculations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Power Grid Model is a Python/C++ library for steady-state distribution power system analysis, supporting power flow, state estimation, and short circuit calculations. Yes, if you work on power system analysis. The library is production-stable, actively maintained, has no known vulnerabilities, and solves a specialized but well-defined problem. Medium install friction is manageable given pre-compiled wheels for common platforms. The copyleft license (MPL-2.0) is a consideration only if you plan to distribute modified versions of the library itself; using it as-is in proprietary applications is permitted. ## Install pip install power-grid-model uv add power-grid-model poetry add power-grid-model ## Installing power-grid-model Before you install: Medium install friction due to compiled C++ bindings; wheels are available for macOS (arm64, x86_64), Linux (aarch64, x86_64), and Windows, reducing build complexity. Requires Python 3.12 or later. Active maintenance with a recent release. License in practice: Licensed under MPL-2.0 (copyleft). Derivative works and modifications must be distributed under the same license; proprietary applications can link to the library but must disclose modifications to the library itself. Quickstart: pip install power-grid-model import power_grid_model # Create and analyze a power grid network using the library's API Requires Python 3.12 or later; compiled wheels are available for common platforms but source builds require a C++ compiler. Verify before relying: - Specific API surface and ease of use for common power flow scenarios - Performance characteristics for large-scale grid models - Integration patterns with external grid data formats or tools ## Package facts - License: MPL-2.0 (copyleft) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 152.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags power flow calculation, electrical grid analysis, state estimation power systems, short circuit analysis, distribution network solver, power system simulation, grid modeling library, power-systems, grid-analysis, scientific-computing [View on SkillFed](https://skillfed.io/packages/power-grid-model) · [View on PyPI](https://pypi.org/project/power-grid-model/)