What is the core data validation library integrated with FastAPI?
Pydantic
What HTTP status code does FastAPI return on input validation failure?
422 Unprocessable Entity
What is the default interactive documentation UI provided by FastAPI at the /docs path?
Swagger UI
What specification does FastAPI use to auto-generate API documentation?
OpenAPI (or Swagger)
What keyword is used to provide a reusable component or service to a path operation function?
Depends
What is the modern, asynchronous standard interface that FastAPI is built upon?
ASGI (Asynchronous Server Gateway Interface)
What is the underlying microframework that provides FastAPI’s routing and tooling?
Starlette
What is the primary benefit of using async def in FastAPI path operations?
Allows non-blocking I/O for higher concurrency/performance
Which security utility in FastAPI simplifies token-based authentication?
OAuth2PasswordBearer
Primary protocol FastAPI uses for asynchronous communication
ASGI (Asynchronous Server Gateway Interface)
Library FastAPI uses for web routing and core logic
Starlette
Library FastAPI uses for data validation and serialization
Pydantic
Language Pydantic V2 is written in to improve speed
Rust
How FastAPI handles ‘def’ (sync) functions
Executes them in a separate thread pool to avoid blocking the event loop
Term for handling multiple tasks by switching during I/O waits
Concurrency
Term for executing multiple tasks simultaneously on different CPU cores
Parallelism
Recommended production server combo for FastAPI
Gunicorn with Uvicorn workers
The bottleneck prevented by using ‘async’ database drivers
Event loop blocking
Benefit of ‘response_model’ in FastAPI
Optimizes serialization and automatically filters output data
Where to move heavy static file handling for better performance
Nginx or a CDN
Impact of excessive middleware on API performance
Increases latency by adding processing layers to every request
Feature used to share DB connection pools across endpoints
Dependency Injection
The event loop’s role in FastAPI
Managing and scheduling asynchronous tasks/coroutines