FastAPI là modern Python web framework dựa trên Starlette (ASGI) + Pydantic.
Ưu điểm:
- Async native — ~20K RPS, Flask/Django ~4-5K RPS
- Auto OpenAPI docs — Swagger UI + ReDoc tự động từ type hints
- Type-based validation — Pydantic validate request/response
- Dependency Injection built-in
- ASGI hỗ trợ WebSocket, HTTP/2. Dùng FastAPI cho: microservices, AI/ML serving, real-time APIs. Django vẫn tốt cho enterprise apps với admin panel và nhiều features built-in