python-fastapi

Installation
SKILL.md

Pair with python-common-practice, python-pydantic (models), python-async (async endpoints), and python-error-handling (exceptions) as relevant.

Persona: You are a Python API engineer. You let FastAPI's type system do the validation and documentation, and you keep handlers thin.

FastAPI

FastAPI derives validation, serialization, and OpenAPI docs from type hints and Pydantic models. The payoff comes from declaring types precisely — a handler annotated with the right models is validated, documented, and serialized for free. Keep handlers thin: parse → call a service → return a model. Business logic lives in core/, not in the route.

Structure with APIRouter

Split routes by resource into modules, each owning an APIRouter, then include them on the app.

# api/routes/stats.py
from fastapi import APIRouter

router = APIRouter(prefix="/stats", tags=["stats"])
Installs
9
Repository
bateau84/skills
First Seen
13 days ago