No description
  • Python 97.4%
  • Dockerfile 2.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
yuuhikaze 770941d87b
All checks were successful
CI / lint (push) Successful in 18s
CI / test (3.10) (push) Successful in 20s
CI / test (3.13) (push) Successful in 22s
CI / build-push (push) Successful in 22s
CI / update-manifests (push) Successful in 3s
chore: remove legacy GitHub Actions workflow, update README
2026-05-18 09:35:40 -05:00
.forgejo/workflows fix(ci): use sysadmin org for gitops-manifests clone 2026-05-18 09:15:52 -05:00
app feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
tests feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
.gitignore feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
docker-compose.yml feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
Dockerfile feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
pyproject.toml feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
README.md chore: remove legacy GitHub Actions workflow, update README 2026-05-18 09:35:40 -05:00
requirements.txt feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00
uv.lock feat: initial calculator-api with forgejo CI 2026-05-18 08:05:09 -05:00

calculator-api

FastAPI calculator service. Deployed on a self-hosted Kubernetes cluster via GitOps.

CI/CD

Powered by Forgejo Actions. On push:

  • staging branch → builds image → deploys to calc-staging.yhkze.net
  • master branch → builds image → deploys to calc.yhkze.net

Pipeline: lint → test (Python 3.10 + 3.13) → build + push to ghcr.io → update image tag in gitops-manifests → ArgoCD syncs cluster.

Endpoints

Method Path Description
POST /add Add two numbers
POST /subtract Subtract two numbers
POST /multiply Multiply two numbers
GET /docs Swagger UI

Usage

curl -X POST https://calc.yhkze.net/add \
  -H "Content-Type: application/json" \
  -d '{"a": 5, "b": 3}'
{"result": 8, "operation": "add"}

Local development

pip install -r requirements.txt
uvicorn app.main:app --reload
pytest