📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials FastAPI What is FastAPI?

What is FastAPI?

5 min read Quiz at the end
FastAPI overview: ASGI, Pydantic validation, auto Swagger docs, and async-first performance.

What is FastAPI?

FastAPI is a modern, fast Python web framework for building APIs. Built on Starlette and Pydantic, it delivers exceptional performance and automatic interactive documentation.

  • Auto-generated Swagger UI docs at /docs
  • Type-safe request/response using Pydantic
  • Async-first (ASGI) — handles thousands of requests
  • Automatic validation and serialization
  • Dependency Injection built-in
pip install fastapi uvicorn
uvicorn main:app --reload   # http://localhost:8000
# Docs at: http://localhost:8000/docs
Topic Quiz · 4 questions

Test your understanding before moving on

1. FastAPI is built on top of which framework?
💡 FastAPI is built on Starlette (ASGI) for the web layer and Pydantic for data validation.
2. Where does FastAPI auto-generate interactive API docs?
💡 FastAPI serves Swagger UI at /docs and ReDoc at /redoc automatically.
3. What is FastAPIs main data validation library?
💡 Pydantic handles all request/response validation using Python type hints.
4. Which server is recommended to run FastAPI?
💡 FastAPI is ASGI-based — use Uvicorn as the server.