Tiny fully-typed ERCOT API
Project description
tinyercot
Fully-typed Python client for the ERCOT Public API.
Why tiny? The entire hand-written codebase is ~420 lines. Everything else is auto-generated from ERCOT's OpenAPI spec.
Install
uv add tinyercot
Setup
export ERCOT_USERNAME="your-username"
export ERCOT_PASSWORD="your-password"
export ERCOT_SUBSCRIPTION_KEY="your-subscription-key"
Usage
Single Page
from datetime import date
import tinyercot
# Returns typed response with .data, .meta, .links
response = tinyercot.np4_190_cd.dam_stlmnt_pnt_prices(
deliveryDateFrom=date(2025, 12, 29),
settlementPoint="HB_HOUSTON",
)
# Convert to pandas DataFrame
df = response.to_df()
Pagination (Sync)
# Iterator - yields typed rows from all pages
for row in tinyercot.np4_190_cd.dam_stlmnt_pnt_prices_iter(
deliveryDateFrom=date(2025, 12, 29),
):
print(row.settlementPoint, row.settlementPointPrice)
# DataFrame - fetches all pages, returns single DataFrame
df = tinyercot.np4_190_cd.dam_stlmnt_pnt_prices_df(
deliveryDateFrom=date(2025, 12, 29),
)
Pagination (Async + Rate Limited)
Async methods automatically rate-limit to 20 req/min with retry on 429:
import asyncio
import tinyercot
async def main():
# Async iterator - rate-limited, non-blocking
async for row in tinyercot.np4_190_cd.dam_stlmnt_pnt_prices_iter_async(
deliveryDateFrom=date(2025, 12, 29),
):
print(row.settlementPoint, row.settlementPointPrice)
# Async DataFrame - rate-limited, non-blocking
df = await tinyercot.np4_190_cd.dam_stlmnt_pnt_prices_df_async(
deliveryDateFrom=date(2025, 12, 29),
)
asyncio.run(main())
API Pattern
Every endpoint generates 5 methods:
| Method | Returns | Use Case |
|---|---|---|
endpoint() |
Response |
Single page |
endpoint_iter() |
Iterator[Row] |
Stream all pages (sync) |
endpoint_df() |
DataFrame |
All pages as DataFrame (sync) |
endpoint_iter_async() |
AsyncIterator[Row] |
Stream all pages (async, rate-limited) |
endpoint_df_async() |
DataFrame |
All pages as DataFrame (async, rate-limited) |
Development
Create a .env file with your credentials, then run IPython with dev deps:
uv run --env-file .env --group dev -- ipython
Regenerate
uv run python tools/generate_client.py
With fresh response field data (requires credentials):
uv run --env-file .env python tools/generate_client.py --refresh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinyercot-0.2.0.tar.gz.
File metadata
- Download URL: tinyercot-0.2.0.tar.gz
- Upload date:
- Size: 70.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da34164f05cd241bbabb1627fe6424726808f1cc5a34d558d9bac965da92982
|
|
| MD5 |
7ff453bec9d925e405df8e2a313c6171
|
|
| BLAKE2b-256 |
abd6e925c2c49fa4f20886567c96e270bfbb4172d46c903dfa90359f17af1c5c
|
Provenance
The following attestation bundles were made for tinyercot-0.2.0.tar.gz:
Publisher:
publish.yml on kvkenyon/tinyercot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinyercot-0.2.0.tar.gz -
Subject digest:
3da34164f05cd241bbabb1627fe6424726808f1cc5a34d558d9bac965da92982 - Sigstore transparency entry: 1255013096
- Sigstore integration time:
-
Permalink:
kvkenyon/tinyercot@560e019b86a65e353329ca238df4ff92c9b27847 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kvkenyon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@560e019b86a65e353329ca238df4ff92c9b27847 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tinyercot-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tinyercot-0.2.0-py3-none-any.whl
- Upload date:
- Size: 71.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f58284b5565d19582d7044c963877830b8502e68bbf2d25cc1f469f60924139d
|
|
| MD5 |
71730615ae97f28259e7df45fad3c586
|
|
| BLAKE2b-256 |
6a944e58dbd1bbae251e2d139930eec68a6d313b2b7435b8b6b42f81a4841980
|
Provenance
The following attestation bundles were made for tinyercot-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on kvkenyon/tinyercot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinyercot-0.2.0-py3-none-any.whl -
Subject digest:
f58284b5565d19582d7044c963877830b8502e68bbf2d25cc1f469f60924139d - Sigstore transparency entry: 1255013212
- Sigstore integration time:
-
Permalink:
kvkenyon/tinyercot@560e019b86a65e353329ca238df4ff92c9b27847 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/kvkenyon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@560e019b86a65e353329ca238df4ff92c9b27847 -
Trigger Event:
push
-
Statement type: