Proof of Concept for a RESTful API made with Python 3 and FastAPI.
- ποΈ Modern async architecture - Async/await throughout, Pydantic validation, and SQLAlchemy 2.0+ patterns
- π Interactive API exploration - Auto-generated OpenAPI docs with FastAPI's built-in Swagger UI
- β‘ Performance optimizations - Async SQLAlchemy, in-memory caching with aiocache, and efficient database operations
- π§ͺ High test coverage - Pytest suite with 80% minimum coverage and automated reporting to Codecov
- π Token-efficient documentation - AGENTS.md + auto-loaded Copilot instructions for AI-assisted development
- π³ Full containerization - Production-ready Docker setup with Docker Compose orchestration
- π Complete CI/CD pipeline - Automated linting (Black/Flake8), testing, Docker publishing, and GitHub releases
- βοΈ Coach-themed semantic versioning - Memorable, alphabetical release names honoring legendary football coaches
Figure: Simplified, conceptual project structure and main application flow. Not all dependencies are shown.
This project uses .python-version to specify the required Python version. If you use pyenv, asdf, or mise, the correct Python version will be automatically activated when you enter the project directory.
Alternatively, ensure you have Python 3.13.3 (or the version specified in .python-version) installed.
pip install -r requirements.txt
pip install -r requirements-lint.txt
pip install -r requirements-test.txtuvicorn main:app --reload --port 9000http://localhost:9000/docsThis setup uses Docker Compose to build and run the app and manage a persistent SQLite database stored in a Docker volume.
docker compose builddocker compose upOn first run, the container copies a pre-seeded SQLite database into a persistent volume On subsequent runs, that volume is reused and the data is preserved
docker compose downdocker compose down -vThis removes the volume and will reinitialize the database from the built-in seed file the next time you
up.
This project uses famous football coaches as release names βοΈ
To create a new release, follow this workflow:
First, document your changes in CHANGELOG.md:
# Move items from [Unreleased] to new release section
# Example: [1.0.0 - Ancelotti] - 2026-02-15
git add CHANGELOG.md
git commit -m "docs: prepare changelog for v1.0.0-ancelotti release"
git pushThen create and push the version tag:
git tag -a v1.0.0-ancelotti -m "Release 1.0.0 - Ancelotti"
git push origin v1.0.0-ancelottiThis triggers the CD workflow which automatically:
- Validates the coach name
- Builds and tests the project with coverage
- Publishes Docker images to GitHub Container Registry with three tags
- Creates a GitHub Release with auto-generated changelog from commits
π‘ Always update CHANGELOG.md before creating the tag. See CHANGELOG.md for detailed release instructions.
Official releases are published to GitHub Container Registry (GHCR):
# By semantic version (recommended)
docker pull ghcr.io/nanotaboada/python-samples-fastapi-restful:1.0.0
# By coach name
docker pull ghcr.io/nanotaboada/python-samples-fastapi-restful:ancelotti
# Latest
docker pull ghcr.io/nanotaboada/python-samples-fastapi-restful:latestπ‘ See CHANGELOG.md for the complete coach list (A-Z) and release history.
The solution has been coded using Visual Studio Code with the official Python extension.
All trademarks, registered trademarks, service marks, product names, company names, or logos mentioned on this repository are the property of their respective owners. All usage of such terms herein is for identification purposes only and constitutes neither an endorsement nor a recommendation of those items. Furthermore, the use of such terms is intended to be for educational and informational purposes only.
