Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

fastapi

FreeNo executable scriptsNot checked

FastAPI Python framework. Covers REST APIs, validation, dependencies, security. Use when building Python web APIs with FastAPI, configuring Pydantic models…

itechmeatby itechmeat★ 24 GitHub stars

About this skill

FastAPI

This skill provides comprehensive guidance for building APIs with FastAPI.

Quick Navigation

Topic Reference
Getting started references/first-steps.md
Path parameters references/path-parameters.md
Query parameters references/query-parameters.md
Request body references/request-body.md
Validation references/validation.md
Cookies/Headers references/cookies-headers.md
Pydantic models references/models.md
Forms/Files references/forms-files.md
Error handling references/error-handling.md
Path config references/path-config.md
Dependencies references/dependencies.md
Security references/security.md
Telemetry references/telemetry.md
Middleware references/middleware.md
CORS references/cors.md
Database references/sql-databases.md
Project structure references/bigger-applications.md
Background tasks references/background-tasks.md
Metadata/Docs references/metadata-docs.md
Testing references/testing.md
Advanced responses references/responses-advanced.md
WebSockets references/websockets.md
Templates references/templates.md
Settings/Env vars references/settings.md
Lifespan events references/lifespan.md
OpenAPI advanced references/openapi-advanced.md

When to Use

  • Creating REST APIs with Python
  • Adding endpoints with automatic validation
  • Implementing OAuth2/JWT authentication
  • Working with Pydantic models
  • Adding dependency injection
  • Configuring CORS, middleware
  • Uploading files, handling forms
  • Testing API endpoints

Installation

Requires Python 3.10+. Install: pip install "fastapi[standard]" (full with uvicorn) or pip install fastapi (minimal). Add python-multipart for forms/files.

Release Highlights (0.141.1 -> 0.159.1)

Breaking changes first — each one changes runtime behavior for existing code.

  • Breaking — **extra removed from request parameters (0.155.0): Path, Query, Header, Cookie, Body, Form, and File no longer accept arbitrary keyword arguments; unknown kwargs now raise TypeError. Use json_schema_extra={"custom": "value"} instead of Query(custom="value"). See references/validation.md.
  • Breaking — root_path deprecated (0.146.0): FastAPI(root_path=...) is deprecated. Configure the server instead: fastapi run --root-path /api/v1.
  • Breaking — openapi_prefix and FastAPI(**extra) removed (0.145.0): both were deprecated and are gone; FastAPI() now rejects them.
  • Breaking — OpenTelemetry auto-configuration is opt-in (0.143.0): FastAPI no longer sets up exporters from OTEL_* environment variables on its own. Set FASTAPI_OTEL_AUTO_CONFIGURE=true or FastAPI(telemetry={"auto_configure": True}) to keep the old behavior. Apps that configure their own providers/exporters need no change. See references/telemetry.md.
  • Breaking — form values follow browser semantics (0.147.0 – 0.153.0): omitted bool/bool | None form fields become False and count as explicitly set (0.147.0); empty scalar form values are treated as missing — required fields error, fields with defaults use the default and stay unset in model_dump(exclude_unset=True), empty strings inside lists are preserved (0.149.0); unselected browser file inputs (empty filename and content) are treated as missing (0.150.0); unions of form models follow the same rules (0.153.0).
  • Breaking — JSON null is not an omitted value (0.151.0): null in a JSON body is validated as None — nullable types accept it, non-nullable types reject it even when a default exists. Defaults and default factories apply only when the value is omitted. Sending null as the whole body of an embedded/multi-parameter body is a validation error. See references/request-body.md.
  • Breaking — defaults are not user input (0.148.0): defaults for omitted Query, Header, Cookie, and Form parameters and parameter-model fields are no longer validated unless validate_default=True, and applying a default no longer marks a field as explicitly set (model_dump(exclude_unset=True) excludes it). Default factories run once, validation errors no longer include injected defaults in input, and Body(validate_default=True) is honored.
  • Native OpenTelemetry (0.142.0): FastAPI emits HTTP request traces, metrics, and logs plus WebSocket traces and logs. Configure it with FastAPI(telemetry={...}) (tracing, metrics
Full SKILL.md on GitHub

Install fastapi in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/background-tasks.mdreferences/bigger-applications.mdreferences/cookies-headers.mdreferences/cors.mdreferences/dependencies.mdreferences/error-handling.mdreferences/first-steps.mdreferences/forms-files.mdreferences/lifespan.mdreferences/metadata-docs.mdreferences/middleware.mdreferences/models.mdreferences/openapi-advanced.mdreferences/path-config.mdreferences/path-parameters.mdreferences/query-parameters.mdreferences/request-body.mdreferences/responses-advanced.mdreferences/security.mdreferences/settings.mdreferences/sql-databases.mdreferences/telemetry.mdreferences/templates.mdreferences/testing.mdreferences/validation.mdreferences/websockets.md

FAQ

What does the fastapi skill do?

FastAPI Python framework. Covers REST APIs, validation, dependencies, security. Use when building Python web APIs with FastAPI, configuring Pydantic models, implementing dependency injection, or setting up OAuth2/JWT authentication. Keywords: FastAPI, Pydantic, async, OAuth2, JWT, REST API.

How do I install the fastapi skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the fastapi skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare fastapi with