A REST API built with FastAPI and Python that exposes energy grid status and distributed energy resource (DER) data. Built to demonstrate Python backend development with modern tooling relevant to the clean energy sector.
Live: https://api.aldenbryce.com Docs: https://api.aldenbryce.com/docs
- Python 3.12
- FastAPI
- Pydantic (data validation and response models)
- Uvicorn (ASGI server)
- Deployed on Render, custom domain via AWS Route 53
| Method | Endpoint | Description |
|---|---|---|
| GET | /health | Service health check |
| GET | /grid/status | Grid status by region. Optional ?region= filter |
| GET | /ders | List distributed energy resources. Optional ?der_id= filter |
# Create and activate virtual environment
python -m venv venv
source venv/Scripts/activate # Windows
# Install dependencies
pip install -r requirements.txt
# Start development server
uvicorn main:app --reloadOpen http://localhost:8000/docs for interactive API documentation.
# All regions
GET /grid/status
# Filter by region
GET /grid/status?region=PJM
# All DERs
GET /ders
# Filter by ID
GET /ders?der_id=DER-002- FastAPI route definitions with query parameters
- Pydantic models for request validation and response documentation
- Optional filtering with list comprehensions
- Automatic OpenAPI/Swagger documentation generation
- Python type hints throughout
- Clean separation between data models and route handlers