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

1from isoview import Client
2
3client = Client("your-api-key")
4
5# Get the latest ERCOT demand forecast as a DataFrame
6df = client.get_regional_forecast("ercot", "demand", as_df=True)
7print(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

1# List available regions
2regions = client.list_regions("pjm", "demand")
3
4# Get forecast for a specific region
5df = client.get_regional_forecast("pjm", "demand", id="pjm_total", as_df=True)
6
7# Compare with ISO's own forecast
8df_iso = client.get_regional_forecast("pjm", "demand", id="pjm_total", model="iso", as_df=True)
9
10# Day-ahead backcast for model evaluation
11df = client.get_region_day_ahead_backcast("pjm", "demand", as_df=True)
12
13# Get all metrics for an ISO in one call
14summary = client.get_iso_summary("pjm")

Automatic chunking

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

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

Error handling

1import requests
2
3try:
4 data = client.get_regional_forecast("pjm", "demand")
5except requests.HTTPError as e:
6 print(e.response.status_code, e.response.text)