This is a simple FastAPI service boilerplate.
Install the required dependencies:
pip install -r requirements.txtRun the FastAPI development server:
uvicorn main:app --reloadThe service will be available at http://127.0.0.1:8000.
The health check endpoint is available at http://127.0.0.1:8000/health.
Build and run the service using Docker Compose:
docker compose up --buildThe service will be available at http://127.0.0.1:8000.
The health check endpoint is available at http://127.0.0.1:8000/health.
To stop the service, press Ctrl+C and then run:
docker compose downRun the tests using pytest:
.venv/bin/pytest