An asynchronous backend service that ingests enterprise batch-compute workloads, analyzes real-time carbon intensity across different data center grid regions, and calculates the optimal time and location to execute the job to minimize carbon emissions.
- Async-first architecture using FastAPI
- Real-time carbon intensity analysis
- Optimal scheduling for carbon reduction
- Structured JSON logging with request tracing
- Comprehensive error handling
- Full test coverage
pip install -e ".[dev]"# Install dependencies
pip install -e ".[dev]"
# Run linting
ruff check .
ruff format .
# Run tests
pytest
# Run server
uvicorn greengrid_shift_api.main:app --reloadPOST /v1/jobs- Submit a workload requestGET /v1/regions/{region_id}/carbon-metrics- Fetch current grid dataPOST /v1/jobs/{job_id}/optimize-schedule- Trigger optimization engine