fastapi

fastapi

fastapi 101k ↓ 6k MIT updated 27d ago
Claude Code
View source ↗

What it does

  • Serve frontend apps: use app.frontend() or router.frontend() for built frontend assets; see Serve Frontend Apps.
  • Server-Sent Events (SSE): use responseclass=EventSourceResponse and yield; see Streaming and the streaming reference.
  • JSON Lines and byte streaming: see the streaming reference.
  • Dependencies: use Annotated[..., Depends(...)]; see Dependency Injection and the dependency injection reference for yield, scopes, and class dependencies.
  • Response models: prefer return types; use responsemodel when the public response schema differs from the internal return value; see the response reference.
  • Pydantic models: do not use ellipsis or RootModel; see the Pydantic reference.
  • Routing: declare router-level prefix, tags, and shared dependencies on the APIRouter; see the path operation reference.

Requirements & configuration

  • Use dependencies when the logic can't be declared in Pydantic validation, depends on external resources, needs cleanup with yield, or is shared across endpoints.

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

fastapi

Source

Repository: https://github.com/fastapi/fastapi

fastapi FAQ

What does the fastapi skill do?

FastAPI best practices and conventions. Use when working with FastAPI APIs, Pydantic models, dependencies, streaming responses including Server-Sent Events (SSE), and serving frontend apps. Keeps FastAPI code clean and up to date with the latest features and patterns. Serve frontend apps: use app.frontend() or router.frontend() for built frontend assets; see Serve Frontend Apps. Server-Sent Events (SSE): use responseclass=EventSourceResponse and yield; see Streaming and the streaming reference.

What does fastapi require?

Use dependencies when the logic can't be declared in Pydantic validation, depends on external resources, needs cleanup with yield, or is shared across endpoints.

How do I install fastapi?

Run: npx -y skills add https://github.com/fastapi/fastapi --skill fastapi --agent claude-code — the source lives at github.com/fastapi/fastapi.

Maintain fastapi?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

fastapi on getagentictools
[![fastapi on getagentictools](https://getagentictools.com/badge/skills/fastapi-fastapi-fastapi.svg)](https://getagentictools.com/skills/fastapi-fastapi-fastapi?ref=badge)
npx agentictools info skills/fastapi-fastapi-fastapi

The second line is the CLI lookup for this page — handy in READMEs and docs.