Skip to content

API Reference

Complete API documentation for ProgridPy, auto-generated from source docstrings via mkdocstrings.

Module Map

ProgridPy is organized into five top-level packages:

Package Purpose
progridpy.common Shared types, configuration, and the generic data-registry base
progridpy.iso ISO client implementations (SPP, MISO, ERCOT) built on ISOBase
progridpy.metrics Financial and risk metrics pipeline (schema, series, calculator, engine)
progridpy.aws S3 transfer handler with concurrent uploads/downloads
progridpy.utils HTTP file downloader, date/path parsers, and the Enverus NRF API client

Import Conventions

ISO clients are imported from the top-level iso package:

from progridpy.iso import SPP, MISO, ERCOT

Enum types for raw and processed data follow the pattern {ISO}{Raw|Processed}DataType:

from progridpy.iso import SPPRawDataType, SPPProcessedDataType
from progridpy.iso import MISORawDataType, MISOProcessedDataType
from progridpy.iso import ERCOTRawDataType, ERCOTProcessedDataType

Common types are re-exported from progridpy.common:

from progridpy.common import ISO, FileLocation, DataDefinition, DataRegistry

Metrics are imported from the metrics package directly:

from progridpy.metrics import MetricsEngine, MetricsCalculator, MetricsResult

AWS and utility modules use their full paths:

from progridpy.aws import S3Handler, S3TransferConfig
from progridpy.utils.downloader import FileDownloader
from progridpy.utils.enverus_api import EnverusClient, EnverusDataType

Type Parameterization

The library uses PEP 695 generics. ISOBase[RawT, ProcessedT] is parameterized over two StrEnum types -- one for raw data types and one for processed data types. Each ISO implementation binds these type parameters to its own enums (e.g., SPP binds to SPPRawDataType and SPPProcessedDataType).

Similarly, DataRegistry[T_DataType, T_Definition] is a generic base that each ISO subclasses with its own data-type enum and definition dataclass.