What is FastAPI?
Why Interviewers Ask This
This question tests conceptual clarity. Interviewers want to hear a precise, confident definition before moving to more complex FastAPI / Flask topics. It also reveals how well you can explain technical ideas to non-experts.
Answer
FastAPI is a modern, high-performance Python web framework for building APIs, created by Sebastián Ramírez. It is built on Starlette (for async HTTP) and Pydantic (for data validation). Key features: Async first: built on Python's async/await and the ASGI standard for non-blocking I/O. Automatic API documentation: generates interactive Swagger UI and ReDoc documentation from your code. Type hints: uses Python type annotations for automatic validation, serialization, and documentation. Performance: comparable to NodeJS and Go — one of the fastest Python frameworks. Pydantic models: define request/response schemas with automatic validation. FastAPI is ideal for high-performance APIs, microservices, and ML model serving where type safety and auto-documentation are valued.
Pro Tip
If you're unsure about a detail, say so honestly and explain your reasoning. Interviewers respect candidates who can think through uncertainty rather than bluffing.