The web module provides a lightweight REST API and HTML template rendering engine powered by FastAPI and Jinja2.
src/project/web/
├── __init__.py # Web package root
├── py.typed # PEP 561 typing marker
├── router.py # Route definitions and FastAPI app instance
└── templates/ # Jinja2 HTML templates
├── base.html # Base HTML layout
├── index.html # Landing page (with environment & version badges)
└── example.html # Dynamic template example
GET /health: Health check endpoint required by Docker container probes, CI/CD runners, and post-deployment smoke tests.{ "status": "ok", "environment": "dev", "version": "0.1.0-dev" }GET /: Renders the interactive landing page (index.html) displaying project metadata and environment status.GET /example/{example_id}: Demonstrates dynamic URL parameter handling and template rendering.
uv run uvicorn project.web:app --host 0.0.0.0 --port 8000 --reloaduv run python-project-starter webThe container runs the production runner stage via uvicorn:
docker compose up -d appService will be available at http://127.0.0.1:${FASTAPI_PORT:-8000}.