Home > Python > Quizzes > FastAPI Practice Test Questions
FastAPI Practice Test Questions
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 60% Most missed: “To create a middleware you use which decorator?”

FastAPI is a modern web framework for building RESTful APIs in Python. FastAPI is based on Pydantic and uses type hints to validate, serialize, and deserialize data.
FastAPI has the following key features: Fast to run: It offers very high performance, on par with NodeJS and Go, thanks to Starlette and pydantic.

FastAPI Practice Test Questions
Time left 00:00
25 Questions

1. When FastAPI was developed?
2. To create a middleware you use which decorator?
3. What is ASGI?
4. ____ are used to specify routes in FastAPI.
5. Does FastAPI come with any built-in server application?
6. WebSockets are supported by FastAPI via the ____ class in the FastAPI module.
7. FastAPI is built on top of ____.
8. ____ is used to return HTTP replies with problems to the client.
9. You must import the ____ in order to apply the validation requirements to a path argument.
10. Pydantic will convert data types automatically whenever feasible.
11. Does FastAPI supports asynchronous requests?
12. What is the full form of WSGI?
13. A ____ is a persistent connection that allows bidirectional, full-duplex communication between a client and a server.
14. Is it important to install Starlette and Pydantic libraries with FastAPI?
15. ____ is a programming technique for converting data between incompatible type systems in object-oriented programming languages.
16. Can we use FastAPI to upload files?
17. FastAPI has a which class to process the data received as a request by submitting an HTML form?
18. Which of the following refers to the addition of a complete 'independent' application in a specified route, which subsequently handles all sub-paths?
19. A ____ is the section of the URL that comes after the initial '/'.
20. FastAPI is a ____.
21. ____ is the process through which an item obtains other objects on which it depends.
22. Which of the following is a decorator for defining a route or endpoint that handles GET requests?
23. Which of the following is a decorator used to specify a FastAPI route or endpoint? It is used to link a function to a certain HTTP request method (such as GET, POST, PUT, DELETE, and so on) and URL path.
24. What is the full form of CORS?
25. To launch the FastAPI application, you'll require an ASGI server named ____.