Building APIs With FastAPI

Check your understanding of routes,requests,and responses in FastAPI.

1. Who is the creator of FastAPI?
2. Which of the following are key features of FastAPI?
3. FastAPI is built on top of the Starlette framework.
4. What Python library does FastAPI use for data validation and parsing (abbrev.)?
5. Which HTTP method decorator is used to handle resource creation in FastAPI?
6. Which of the following are valid ways to define query parameters in FastAPI?
7. Path parameters in FastAPI are enclosed in square brackets [].
8. What is the default endpoint for FastAPI's interactive Swagger UI documentation?
9. Which class must a Pydantic model inherit from to define request bodies?
10. Which of the following are supported by FastAPI's dependency injection system?
11. FastAPI endpoints can return Python dictionaries, which are automatically converted to JSON.
12. What is the term for a function that runs after returning a response, often used for cleanup tasks?
13. How do you make a query parameter required in FastAPI?
14. Which status codes can be returned using FastAPI's status module?
15. FastAPI does not support synchronous endpoint functions.
16. What command is commonly used to run a FastAPI application during development (starts with 'uvicorn')?
17. Which middleware is used to handle Cross-Origin Resource Sharing (CORS) in FastAPI?
18. Which of the following are benefits of using Pydantic models in FastAPI?
19. FastAPI's dependency injection system caches dependencies by default (singleton scope).
20. What is the full form of 'OpenAPI', the standard used by FastAPI for API documentation?
Answered 0 of 0 — 0 correct