Auto-generated Python models from Sienna-Platform power system OpenAPI schemas.
The package is organized into four domain subpackages:
src/power_openapi_models/
├── core/ # Shared types, enums, base models
├── operations/ # Operations API stubs
├── investments/ # Investments API stubs
└── dynamics/ # Dynamics API stubs
pip install power-openapi-models# Import only what you need
from power_openapi_models.core.models import TimeSeries, NetworkTopology
from power_openapi_models.operations.models import Generator, Bus
from power_openapi_models.investments.apis import PortfolioApi
# Or import a whole domain
from power_openapi_models import operationsModels are auto-generated from OpenAPI schemas in SiennaSchemas. There are two ways to regenerate locally:
make generatemake generate-local# Build the codegen image
docker build -t power-openapi-models-codegen .
# Run generation (mount schemas and repo root)
docker run --rm \
-v $(pwd)/openapi:/schemas:ro \
-v $(pwd):/output \
power-openapi-models-codegen \
/schemas /outputpip install -e ".[dev]"
pytest tests/