1.1. FastAPI About¶
Automatic documentation (Swagger, Redoc)
Uses Python type annotation
IDE autocomplete (through type annotation)
Fast - on par with Go lang and node.js frameworks
Based on open standards: JSON Schema, Open API
Security and authentication
OAuth2 (also with JWT tokens)
API keys in Headers, Query parameters, Cookies, etc.
In-process background tasks
Startup and shutdown events
Test client built on requests
CORS, GZip, Static Files, Streaming responses
Sessions and Cookies support
Suport for databases
1.1.1. Key Features¶
Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic).
One of the fastest Python frameworks available.
Fast to code: Increase the speed to develop features by about 200% to 300%.
Fewer bugs: Reduce about 40% of human (developer) induced errors.
Intuitive: Great editor support. Completion everywhere. Less time debugging.
Easy: Designed to be easy to use and learn. Less time reading docs.
Short: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
Robust: Get production-ready code. With automatic interactive documentation.
Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
1.1.2. Used by¶
Microsoft in Windows and Office
Netflix in Dispatch (crisis management)