This guide covers different ways to add gridappsd-python as a dependency in your project.
pip install gridappsd-python# Stable release from PyPI
gridappsd-python>=2025.3.0
# Or pin to a specific version
gridappsd-python==2025.3.2
# Development release from GitHub
gridappsd-python @ https://github.com/GRIDAPPSD/gridappsd-python/releases/download/v2025.3.2a14/gridappsd_python-2025.3.2a14-py3-none-any.whl
# Or install from a git tag
gridappsd-python @ git+https://github.com/GRIDAPPSD/gridappsd-python.git@v2025.3.2a14#subdirectory=gridappsd-python-lib
# Or install from the develop branch (latest development code)
gridappsd-python @ git+https://github.com/GRIDAPPSD/gridappsd-python.git@develop#subdirectory=gridappsd-python-lib[project]
dependencies = [
# Stable release from PyPI
"gridappsd-python>=2025.3.0",
]
# For development releases, use optional dependencies
[project.optional-dependencies]
dev = [
"gridappsd-python @ git+https://github.com/GRIDAPPSD/gridappsd-python.git@develop#subdirectory=gridappsd-python-lib",
][tool.poetry.dependencies]
# Stable release from PyPI
gridappsd-python = "^2025.3.0"
# Or pin to specific version
gridappsd-python = "2025.3.2"
# Development release from git
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-python-lib" }
# Or from a specific tag
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", tag = "v2025.3.2a14", subdirectory = "gridappsd-python-lib" }[pypi-dependencies]
# Stable release from PyPI
gridappsd-python = ">=2025.3.0"
# Or pin to specific version
gridappsd-python = "==2025.3.2"
# Development release from git
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-python-lib" }
# Or from a specific tag
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", tag = "v2025.3.2a14", subdirectory = "gridappsd-python-lib" }
# Or from a specific commit
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", rev = "abc1234", subdirectory = "gridappsd-python-lib" }The gridappsd-field-bus package provides additional field bus functionality and depends on gridappsd-python.
# Both packages from PyPI
gridappsd-python>=2025.3.0
gridappsd-field-bus>=2025.3.0
# Or from GitHub releases
gridappsd-python @ https://github.com/GRIDAPPSD/gridappsd-python/releases/download/v2025.3.2a14/gridappsd_python-2025.3.2a14-py3-none-any.whl
gridappsd-field-bus @ https://github.com/GRIDAPPSD/gridappsd-python/releases/download/v2025.3.2a14/gridappsd_field_bus-2025.3.2a14-py3-none-any.whl[project]
dependencies = [
"gridappsd-python>=2025.3.0",
"gridappsd-field-bus>=2025.3.0",
][tool.poetry.dependencies]
gridappsd-python = "^2025.3.0"
gridappsd-field-bus = "^2025.3.0"
# Or from git (both packages)
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-python-lib" }
gridappsd-field-bus = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-field-bus-lib" }[pypi-dependencies]
gridappsd-python = ">=2025.3.0"
gridappsd-field-bus = ">=2025.3.0"
# Or from git
gridappsd-python = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-python-lib" }
gridappsd-field-bus = { git = "https://github.com/GRIDAPPSD/gridappsd-python.git", branch = "develop", subdirectory = "gridappsd-field-bus-lib" }| Specifier | Meaning |
|---|---|
>=2025.3.0 |
Version 2025.3.0 or newer |
^2025.3.0 |
Compatible with 2025.3.x (Poetry) |
~=2025.3.0 |
Compatible release (>=2025.3.0, <2026.0.0) |
==2025.3.2 |
Exact version |
>=2025.3.0,<2026.0.0 |
Range |
import gridappsd
print(gridappsd.__version__)
# Test connection (requires running GridAPPS-D instance)
from gridappsd import GridAPPSD
gapps = GridAPPSD()
print(f"Connected: {gapps.connected}")If you get errors with git dependencies, ensure you have git installed and accessible:
git --versionIf you encounter SSL errors when installing from GitHub, do not bypass certificate verification, as this can expose you to security risks.
Instead, try the following steps:
- Ensure your system's CA certificates are up to date. On Ubuntu/Debian, run:
sudo apt-get update && sudo apt-get install --reinstall ca-certificates
When using git dependencies with subdirectories, ensure the syntax is correct:
# Correct
pip install "git+https://github.com/GRIDAPPSD/gridappsd-python.git@develop#subdirectory=gridappsd-python-lib"
# Wrong (missing subdirectory)
pip install "git+https://github.com/GRIDAPPSD/gridappsd-python.git@develop"