Skip to main content

Upload to PyPi • Pytest • deploy-book • PyPI - Downloads • codecov • CodeFactor • MCP Server • MCP Tools • GitHub issues • License • PyPI Downloads • Generate LinkedIn Post Draft

Grid Data Models (GDM)

GDM is a python package containing data models for power system assets and datasets. This package is actively being developed at National Renewable Energy Laboratory (NREL).

GDM models distribution networks and utility substations as complementary systems. DistributionSystem represents feeder and network connectivity; SubstationSystem represents station topology, primary equipment, protection, metering, and automation. They can remain separate or be joined at explicit feeder boundaries. See the system model guide and the guide to connecting systems.

Installation

You can install the latest version of grid-data-models from PyPi.

pip install grid-data-models

Why Grid Data Models?

In an effort to reduce code duplication and provide client packages a standard interface to interact with power system data, a group of research engineers at NREL is working on developing standard data models. Features:

  • Built-in validation layer: Use of pydantic allows us to validate model fields.
  • Time series data management: GDM uses infrasys package which enables efficient time series data management by sharing arrays across components and offloading system memory. For example, we can attach time series power consumption data to a load profile.
  • Built-in unit conversion: GDM leverages pint for unit conversion for power system quantities. For example, power, voltage, time, etc.
  • JSON serialization/deserialization: GDM uses infrasys to serialize and deserialize distribution system components to/from JSON.
  • Track System Changes: Supports tracking changes within a distribution model (both temporal and scenario-based static updates), enabling powerful scenario management capabilities.
  • Graph-Based Analysis: Exposes a connectivity graph using NetworkX, allowing advanced graph-based algorithms and visualizations.
  • Interoperability: Easily integrates with existing tools.
  • Model reduction: Built-in support for multiple model reduction algorithms.

How to get started?

Simulator-neutral distribution equipment

Loads use PhaseLoadEquipment ZIP coefficients. Optional voltage bounds and a ZIP cutoff describe operating behavior; paired active/reactive voltage exponents represent exponential loads without storing simulator model numbers. Aggregation requires matching voltage behavior. Transformer equipment exposes magnetizing_current_pct.

SequenceImpedanceBranchEquipmentBase shares typed sequence quantities between branch and switch equipment. SequenceImpedanceSwitch represents three-phase switches; its equipment can produce an equivalent ABC matrix through to_matrix_equipment() (negative sequence equals positive sequence). Matrix-defined switches continue to use MatrixImpedanceSwitch. Its optional conductor_phases maps each matrix row/conductor to a phase at both terminals, preserving parallel conductors on the same phase. phases remains unique; is_closed has one entry per conductor (num_conductors).

Models containing generic equipment need only GDM to deserialize. Simulator-specific translation belongs in external readers and writers, not GDM.

To get started, you can clone and pip install this library from here.

Model Context Protocol (MCP) Integration

GDM includes an MCP server that enables AI assistants to interact with power system models through natural language. The MCP integration provides:

  • System inspection and analysis - Query components, analyze topology, validate connectivity
  • Validation and diagnostics - Diagnose errors, suggest fixes, and automatically apply corrections
  • System operations - Merge, split, and extract subsystems
  • Documentation and API access - Search documentation and get component API references

To install with MCP support:

pip install -e ".[mcp]"

To run the MCP server:

gdm-mcp-server

For more details, see the MCP documentation.

Contributors

  • Aadil Latif
  • Daniel Thom
  • Jeremy Keen
  • Kapil Duwadi
  • Tarek Elgindy
  • Pedro Andres Sanchez Perez

Metadata

Release files for grid-data-models 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grid-data-models 2.4.1
File Size Uploaded Provenance Actions
grid_data_models-2.4.1.tar.gz 128.2 kB With provenance Details for grid_data_models-2.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for grid-data-models 2.4.1
File Interpreter ABI Platform Actions
grid_data_models-2.4.1-py3-none-any.whl Python 3 none any Details for grid_data_models-2.4.1-py3-none-any.whl

Total release size: 322.8 kB

Release files / grid_data_models-2.4.1.tar.gz

Download URL grid_data_models-2.4.1.tar.gz
Size 128.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ae96bb453e2b12277803b677983cd77cf48ac6208d5a9b07358c00d2df93ed6
BLAKE2b-256 checksum
How to use checksums
f6d2b82b2b485a2fd5e656c39b3594355cc1a536fbc82537e18d4bbf51257476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / grid_data_models-2.4.1-py3-none-any.whl

Download URL grid_data_models-2.4.1-py3-none-any.whl
Size 194.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b20e6e12429017af6e3b9cd4bf24209998b31a2be94c51fd90ee2344dabacc72
BLAKE2b-256 checksum
How to use checksums
fca39004f4f19a3883e6c1e2e9c123cd43d82ad65ea0810af34d1a776cc640ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for grid-data-models 2.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for grid_data_models-2.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.4.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page