Field note
What it does
FastAPI fastapi/fastapi FastAPI Features Learn Python Types Intro Concurrency and async / await Tutorial - User Guide First Steps Path Parameters Query Parameters Request Body Query Parameters and String Validations Path Parameters and Numeric Validations Query Parameter Models Body - Multiple Parameters Body - Fields Body - Nested Models Declare Request Example Data Extra Data Types Cookie Parameters Header Parameters Cookie Parameter Models Header Parameter Models Response Model - Return Type Extra Models Response Status Code Form Data Form Models Request Files Request Forms and Files Handling Errors Path Operation Configuration JSON Compatible Encoder Body - Updates Dependencies Classes as Dependencies Sub-dependencies Dependencies in path operation decorators Global Dependencies Dependencies with yield Security Security - First Steps Get Current User Simple OAuth2 with Password and Bearer OAuth2 with Password (and hashing), Bearer with JWT tokens Middleware CORS (Cross-Origin Resource Sharing) SQL (Relational) Databases Bigger Applications - Multiple Files Stream JSON Lines Server-Sent Events (SSE) Background Tasks Metadata and Docs URLs Frontend Static Files Testing Debugging Advanced User Guide Stream Data Path Operation Advanced Configuration Additional Status Codes Return a Response Directly Custom Response - HTML, Stream, File, others Additional Responses in OpenAPI Response Cookies Response Headers Response - Change Status Code Advanced Dependencies Advanced Security OAuth2 scopes HTTP Basic Auth Using the Request Directly Using Dataclasses Advanced Middleware Sub Applications - Mounts Behind a Proxy Templates WebSockets Lifespan Events Testing WebSockets Testing Events: lifespan and startup - shutdown Testing Dependencies with Overrides Async Tests Settings and Environment Variables OpenAPI Callbacks OpenAPI Webhooks Including WSGI - Flask, Django, others Generating SDKs Advanced Python Types JSON with Bytes as Base64 Strict Content-Type Checking FastAPI CLI Editor Support Deployment About FastAPI versions FastAPI Cloud About HTTPS Run a Server Manually Deployments Concepts Deploy FastAPI on Cloud Providers Server Workers - Uvicorn with Workers FastAPI in Containers - Docker How To - Recipes General - How To - Recipes Migrate from Pydantic v1 to Pydantic v2 GraphQL Custom Request and APIRoute class Conditional OpenAPI Extending OpenAPI Separate OpenAPI Schemas for Input and Output or Not Custom Docs UI Static Assets (Self-Hosting) Configure Swagger UI Testing a Database Use Old 403 Authentication Error Status Codes Reference FastAPI class Request Parameters Request Parameters On this page Query Path Body Cookie Header Form File Status Codes UploadFile class Exceptions - HTTPException and WebSocketException Dependencies - Depends() and Security() APIRouter class Background Tasks - BackgroundTasks Request class WebSockets HTTPConnection class Response class Custom Response Classes - File, HTML, Redirect, Streaming, etc. Server-Sent Events - EventSourceResponse and ServerSentEvent Middleware OpenAPI OpenAPI docs OpenAPI models Security Tools Encoders - jsonable_encoder Static Files - StaticFiles Templating - Jinja2Templates Test Client - TestClient Resources FastAPI People Help Contributing Translations Full Stack FastAPI Template External Links FastAPI and friends newsletter About Alternatives, Inspiration and Comparisons History, Design and Future Benchmarks Repository Management Release Notes On this page Query Path Body Cookie Header Form File FastAPI Reference Request Parameters ¶ Here's the reference information for the request parameters. These are the special functions that you can put in path operation function parameters or dependency functions with Annotated to get data from the request. It includ Sections: Status Codes ¶ | Example ¶ | fastapi.status ¶ | HTTP_100_CONTINUE module-attribute ¶ | HTTP_101_SWITCHING_PROTOCOLS module-attribute ¶ | HTTP_102_PROCESSING module-attribute ¶ | HTTP_103_EARLY_HINTS module-attribute ¶ | HTTP_200_OK module-attribute ¶ | HTTP_201_CREATED module-attribute ¶ | HTTP_202_ACCEPTED module-attribute ¶ | HTTP_203_NON_AUTHORITATIVE_INFORMATION module-attribute ¶ | HTTP_204_NO_CONTENT module-attribute ¶ | HTTP_205_RESET_CONTENT module-attribute ¶ | HTTP_206_PARTIAL_CONTENT module-attribute ¶ | HTTP_207_MULTI_STATUS module-attribute ¶ | HTTP_208_ALREADY_REPORTED module-attribute ¶ | HTTP_226_IM_USED module-attribute ¶ | HTTP_300_MULTIPLE_CHOICES module-attribute ¶ | HTTP_301_MOVED_PERMANENTLY module-attribute ¶ | HTTP_302_FOUND module-attribute ¶ | HTTP_303_SEE_OTHER module-attribute ¶ | HTTP_304_NOT_MODIFIED module-attribute ¶ | HTTP_305_USE_PROXY module-attribute ¶ | HTTP_306_RESERVED module-attribute ¶ | HTTP_307_TEMPORARY_REDIRECT module-attribute ¶ | HTTP_308_PERMANENT_REDIRECT module-attribute ¶ | HTTP_400_BAD_REQUEST module-attribute ¶ | HTTP_401_UNAUTHORIZED module-attribute ¶ | HTTP_402_PAYMENT_REQUIRED module-attribute ¶ | HTTP_403_FORBIDDEN module-attribute ¶ | HTTP_404_NOT_FOUND module-attribute ¶ | HTTP_405_METHOD_NOT_ALLOWED module-attribute ¶ | HTTP_406_NOT_ACCEPTABLE module-attribute ¶ | HTTP_407_PROXY_AUTHENTICATION_REQUIRED module-attribute ¶ | HTTP_408_REQUEST_TIMEOUT module-attribute ¶ | HTTP_409_CONFLICT module-attribute ¶ | HTTP_410_GONE module-attribute ¶ | HTTP_411_LENGTH_REQUIRED module-attribute ¶ | HTTP_412_PRECONDITION_FAILED module-attribute ¶ | HTTP_413_CONTENT_TOO_LARGE module-attribute ¶ | HTTP_414_URI_TOO_LONG module-attribute ¶ | HTTP_415_UNSUPPORTED_MEDIA_TYPE module-attribute ¶ | HTTP_416_RANGE_NOT_SATISFIABLE module-attribute ¶ | HTTP_417_EXPECTATION_FAILED module-attribute ¶ | HTTP_418_IM_A_TEAPOT module-attribute ¶ | HTTP_421_MISDIRECTED_REQUEST module-attribute ¶ | HTTP_422_UNPROCESSABLE_CONTENT module-attribute ¶ | HTTP_423_LOCKED module-attribute ¶ | HTTP_424_FAILED_DEPENDENCY module-attribute ¶ | HTTP_425_TOO_EARLY module-attribute ¶ | HTTP_426_UPGRADE_REQUIRED module-attribute ¶ | HTTP_428_PRECONDITION_REQUIRED module-attribute ¶ | HTTP_429_TOO_MANY_REQUESTS module-attribute ¶ | HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE module-attribute ¶ | HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS module-attribute ¶ | HTTP_500_INTERNAL_SERVER_ERROR module-attribute ¶ | HTTP_501_NOT_IMPLEMENTED module-attribute ¶ | HTTP_502_BAD_GATEWAY module-attribute ¶ | HTTP_503_SERVICE_UNAVAILABLE module-attribute ¶ | HTTP_504_GATEWAY_TIMEOUT module-attribute ¶ | HTTP_505_HTTP_VERSION_NOT_SUPPORTED module-attribute ¶ | HTTP_506_VARIANT_ALSO_NEGOTIATES module-attribute ¶ | HTTP_507_INSUFFICIENT_STORAGE module-attribute ¶ | HTTP_508_LOOP_DETECTED module-attribute ¶ | HTTP_510_NOT_EXTENDED module-attribute ¶ | HTTP_511_NETWORK_AUTHENTICATION_REQUIRED module-attribute ¶ | WS_1000_NORMAL_CLOSURE module-attribute ¶ | WS_1001_GOING_AWAY module-attribute ¶ | WS_1002_PROTOCOL_ERROR module-attribute ¶ | WS_1003_UNSUPPORTED_DATA module-attribute ¶ | WS_1005_NO_STATUS_RCVD module-attribute ¶ | WS_1006_ABNORMAL_CLOSURE module-attribute ¶ | WS_1007_INVALID_FRAME_PAYLOAD_DATA module-attribute ¶ | WS_1008_POLICY_VIOLATION module-attribute ¶ | WS_1009_MESSAGE_TOO_BIG module-attribute ¶ | WS_1010_MANDATORY_EXT module-attribute ¶ | WS_1011_INTERNAL_ERROR module-attribute ¶ | WS_1012_SERVICE_RESTART module-attribute ¶ | WS_1013_TRY_AGAIN_LATER module-attribute ¶ | WS_1014_BAD_GATEWAY module-attribute ¶ | WS_1015_T FastAPI fastapi/fastapi FastAPI Features Learn Python Types Intro Concurrency and async / await Tutorial - User Guide First Steps Path Parameters Query Parameters Request Body Query Parameters and String Vali
Capabilities
Available capabilities
Tags
Tags
No tags filed yet.
Ways to use it
Ways to use it
No integrations filed yet.