A minimal, flexible and pragmatic FastAPI template to kickstart REST API development. Designed for prototyping, PoCs, internal tools, and dev utilities — with a strong foundation but without unnecessary complexity.
Note
fapid-rest
is made for speed, clarity, and developer happiness 🚀
Service : A concrete service class defines the API of an external Service. Model : Defines the applications data model. Controllers : Where all the routes lives in API REST.
MCS stands for Model-Controller-Service. I don't want to bloater all with a lot of Clases, Wrappers or huge complexity, just simple and minimaslitic
. Think of it like MVC — but:
- 🧠 Easier to reason about.
- 📁 Organized folder structure
- 🧪 Ideal for rapid PoC creation.
- ⚒️ Minimal setup. Easy to scale or swap in prod later.
Perfect when you want to start lean but keep your codebase clean.
- FastAPI – Python’s async web framework for high-performance APIs.
- Pydantic - Data validation using Python type hints.
- SQLModel – Type-safe SQL layer, blending SQLAlchemy and Pydantic.
- 🧱 Clean and simple MCS architecture
- 🗂️ Predefined folder structure by Domain:
fapid_rest/user
,fapid_rest/item
- 🐳 Dockerized for local dev and deploy
- 🧪 Basic test setup with
pytest
- 🧹 Linting and formatting via ruff
- 📦 Dependency management with pip-tools
- ⚡️ Powered by uv for fast Python execution
- 🐣 Project management with hatch
pipx is a tool to install and run Python CLI apps in isolated environments — safely and globally.
Instead of polluting your global Python environment with packages like hatch, uv, or black, pipx creates a virtual environment per tool, then exposes the CLI to your $PATH.
pipx is like nvm or rustup, but for Python CLI tools.
- 🔒 Isolated
- 🧼 Clean
- 🔁 Reproducible
- 💨 Fast when paired with uv
-
Zero conflicts across projects
Installing CLI tools globally with pip can easily cause version conflicts. pipx keeps each tool isolated — no conflicts, no surprises.
-
Python version friendly
Want to use Python 3.11 for uv, 3.10 for hatch? pipx supports that with:
-
Reproducibility + portability
You can pin and install the same versions of tools across machines or CI pipelines, ensuring your dev environment is predictable.
-
Uninstalls cleanly pipx uninstall hatch deletes the tool and its virtualenv cleanly — no residuals in your system.
Here's a one-liner to install modern Python tooling that works across all your projects:
pipx install hatch uv pip-tools --python python3.11
# with hatch
hatch env create
# with uv
uv venv --python 3.11
uv pip compile requirements/requirements.in -o requirements/requirements.txt
uv pip install -r requirements/requirements.txt
docker compose up -d
hatch run dev