This repository provides an HTTP API that exposes the features of fristenkalender_generator and bdew-datetimes as a REST API. It's used by the fristenkalender-frontend which is deployed to fristenkalender.hochfrequenz.de.
The actual business logic for BDEW calendar calculations (working days, holidays, deadlines) is implemented in the upstream packages: fristenkalender_generator by Hochfrequenz and bdew-datetimes by mj0nez.
A pre-built Docker image is publicly available on the GitHub Container Registry:
docker pull ghcr.io/hochfrequenz/fristenkalender-functions:latest
docker run -p 8000:80 ghcr.io/hochfrequenz/fristenkalender-functions:latestThe API documentation is available at the /docs endpoint (OpenAPI/Swagger UI).
Install the dependencies and run the application:
pip install .
fastapi dev src/app/main.pyThen open http://localhost:8000/docs to view the API documentation.
When you publish a new release in GitHub, the deploy-azure.yml workflow automatically:
- Builds the Docker image
- Pushes it to Azure Container Registry
- Deploys to Azure Container Apps
Another workflow automatically builds a Docker image and pushes it to GHCR. This image on GHCR is used e.g. by the frontend for its integration tests.
We only run 1 instance, the production environment: Azure Portal fristenkalender-api Container App (in the hochfrequenz.de tenant).