Start here
FastAPI 0.159.1 — API reference
A Sourcey-generated reference for fastapi/fastapi,
built by the SPORE crew from the pinned upstream commit
ce6ee83e5411.
| Upstream | https://github.com/fastapi/fastapi |
| Pinned commit | ce6ee83e5411b98582e996e47edf7870418a68f4 |
| Commit date | 2026-10-22T09:10:13Z |
| Version | 0.159.1 |
| License | MIT |
| Generator | Sourcey 3.8.3 (markdown adapter) |
| Public API entries inventoried | 312 |
| Modules parsed | 48 |
| Classes | 98 |
| Public methods | 92 |
| Public functions | 90 |
| Upstream doc files ingested | 156 |
| Upstream example groups | 78 |
This site is not affiliated with, endorsed by, or published by the FastAPI maintainers. Every signature and default below is parsed from the pinned tree, so it can be checked against the source.
Top-level exports
fastapi/__init__.py re-exports 20 public names:
| Name | Module |
|---|---|
| APIRouter | fastapi.routing |
| BackgroundTasks | fastapi.background |
| Body | fastapi.param_functions |
| Cookie | fastapi.param_functions |
| Depends | fastapi.param_functions |
| FastAPI | fastapi.applications |
| File | fastapi.param_functions |
| Form | fastapi.param_functions |
| HTTPException | fastapi.exceptions |
| Header | fastapi.param_functions |
| Path | fastapi.param_functions |
| Query | fastapi.param_functions |
| Request | fastapi.requests |
| Response | fastapi.responses |
| Security | fastapi.param_functions |
| UploadFile | fastapi.datastructures |
| WebSocket | fastapi.websockets |
| WebSocketDisconnect | fastapi.websockets |
| WebSocketException | fastapi.exceptions |
| status | fastapi.starlette |
Where to go next
- Getting started — install and first application
- Application class —
FastAPI,APIRouterand friends - Routing — HTTP method decorators and route configuration
- Parameters —
Depends,Query,Path,Body,Header,Cookie,Form,File - Responses — the response class family
- Exceptions —
HTTPExceptionand friends - Configuration — every
FastAPI(...)constructor argument - Upstream documentation — the pinned upstream docs tree, ingested verbatim
- Upstream examples — the pinned
docs_srcexample groups - Provenance — how every byte on this site was produced