Install & Compatibility
Where this runs
tested against v0.36.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.628s · 335MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 17.3s · import 1.646s · 324MB
362MB installed
● package 362MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
gs
✓ import gridstatus as gs
✗ from gridstatus import *
Star imports are discouraged; use the alias gs for cleaner code.
CAISO
✓ from gridstatus import CAISO
Direct import of ISO classes is the recommended pattern.
gridstatus
✓ import gridstatus
✗ import grid_status
The correct package name is gridstatus (no underscore).
Quickstart: Initialize an ISO instance (e.g., CAISO) and call a method like get_fuel_mix. No API key required for basic operations.
import gridstatus as gs
# Fetch today's fuel mix from CAISO (no API key needed for most endpoints)
caiso = gs.CAISO()
today_mix = caiso.get_fuel_mix(date='today')
print(today_mix.head())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'gridstatus'
Library not installed or installed in a different environment.
fixRun `pip install gridstatus` in your active environment.
AttributeError: module 'gridstatus' has no attribute 'CAISO'
Trying to access an ISO class on the module level without importing it, or using an outdated version where the class name was different.
fixUse `from gridstatus import CAISO` or `import gridstatus as gs` then `gs.CAISO`. For older versions (<0.20), use the old name (e.g., 'Caiso').
ValueError: Invalid date format. Expected 'YYYY-MM-DD'
Passing a datetime object or wrongly formatted string as the date parameter.
fixConvert to string: `date='2023-10-01'` or use `date.today().isoformat()`.
Upgrade
Version history
0.36.0latest on PyPI · released Apr 21, 2026
Audit
Dependencies
pandasrequiredData manipulation and output
requestsrequiredHTTP requests to ISO APIs
python-dateutilrequiredDate parsing helpers