A tiny HTTP server built with FastAPI, demonstrating usage of environment variables and modern Python packaging with UV.
- Simple HTTP API with endpoints:
/— returns a greeting/bye— returns a farewell/external— returns a project external api/healthcheck— returns application healthcheck/???— returns a secret (chuuu don't tell anyone)
There is a Makefile for your convenience and usage.
Follow instructions from the UV Docs or use:
curl -Ls https://astral.sh/uv/install.sh | sh
uv self version # uv 0.8.13Run the following command in the project directory:
uv venv --python 3.13
uv sync
uv run pytest # If you want to run the testsStart the FastAPI server using Uvicorn:
uv run uvicorn app.main:app --port 8080 # Go to http://localhost:8080To build this container run these commands:
docker buildx build -f Dockerfile . -t httpenv-app
docker run -d httpenv-app:latestFollow instructions from the gghshield docs or use:
pipx install ggshield # if you are old school using .venv
pipx install ggshield # if you are using os-level python isolation env
uv tool install ggshield # if you use UV.. you should be using UVFollow instructions from the gghshield docs or use:
ggshield auth login
ggshield api-status
ggshield quotaRename .sample.env to .env file in the project root and include a secret var here:
SECRET ="<your-token-here>"