Template repository for spinning up a new cofy-api instance — the open-source modular framework by EnergyID for ingesting, standardising, and serving energy-related data.
Use this template: click "Use this template" on GitHub (or clone and rename) to start a fresh project. Then follow the steps below.
- Python 3.12+
- uv (fast Python package manager)
uv synccp .env.example .env
# Edit .env and fill in your valuesOpen main.py and add the modules you need (tariff, production, …).
See cofy-api README for all available modules & options.
poe dev # starts FastAPI with auto-reload, reads .envThe API is now available at http://localhost:8000.
Health-check: GET /health
poe prod # builds the Docker image and runs it on port 8080The container is available at http://localhost:8080.
Health-check: GET /health
Pre-commit hooks are configured out of the box. Install them once:
pre-commit installEvery commit will automatically run:
| Tool | Task | Command |
|---|---|---|
| Ruff | Linting + auto-fix | poe lint |
| Ruff | Formatting | poe format |
| ty | Type checking | poe check |
You can also run them manually at any time.