Python Client

Official Python SDK for the ISOview API
View as Markdown

The official Python client provides a convenient wrapper around the ISOview REST API with automatic pandas DataFrame conversion, request chunking, and dynamic method generation. Methods are built dynamically from the API’s OpenAPI spec at init time, so the client stays in sync with the API automatically.

Getting started

1

Install the package

pip install isoview-client

Requires Python 3.10+. Dependencies: requests, pandas.

2

Fetch your first forecast

from isoview import Client
client = Client("your-api-key")
# Get the latest ERCOT demand forecast as a DataFrame
df = client.get_regional_forecast("ercot", "demand", as_df=True)
print(df.head())
ercot
2026-03-17 07:00:00+00:00 45230.5
2026-03-17 08:00:00+00:00 44892.1
2026-03-17 09:00:00+00:00 44105.3
2026-03-17 10:00:00+00:00 43521.8
2026-03-17 11:00:00+00:00 43198.2

Use dir(client) to see all available methods, or help(client.get_regional_forecast) for detailed usage on any method.

Examples

# List available regions
regions = client.list_regions("pjm", "demand")
# Get forecast for a specific region
df = client.get_regional_forecast("pjm", "demand", id="pjm_total", as_df=True)
# Compare with ISO's own forecast
df_iso = client.get_regional_forecast("pjm", "demand", id="pjm_total", model="iso", as_df=True)
# Day-ahead backcast for model evaluation
df = client.get_region_day_ahead_backcast("pjm", "demand", as_df=True)
# Get all metrics for an ISO in one call
summary = client.get_iso_summary("pjm")

Automatic chunking

Requests spanning more than 365 days are automatically split into yearly chunks and merged:

df = client.get_region_day_ahead_backcast(
"pjm", "demand",
start="2023-01-01T00:00:00Z",
end="2025-06-01T00:00:00Z",
as_df=True,
)

Error handling

import requests
try:
data = client.get_regional_forecast("pjm", "demand")
except requests.HTTPError as e:
print(e.response.status_code, e.response.text)