Python API Development With FastAPI

A complete test on designing,deploying,and testing APIs.

1. Which class is used to create a FastAPI application instance?
2. FastAPI is built on top of the Starlette framework.
3. What is the default HTTP port number when running a FastAPI application with uvicorn?
4. Which of the following are automatically generated by FastAPI? (Select all that apply)
5. Which decorator is used to define a GET endpoint in FastAPI?
6. Pydantic models are optional when defining request bodies in FastAPI.
7. What is the name of the tool provided by FastAPI for testing endpoints programmatically (imported from fastapi.testclient)?
8. Which parameter types are supported by FastAPI? (Select all that apply)
9. In FastAPI, path parameters are specified using which syntax in the route decorator?
10. FastAPI requires Python 3.7 or higher to run.
11. What argument in a route decorator specifies the response model for an endpoint?
12. Which ASGI server is commonly used to run FastAPI applications?
13. Which return types are valid for a FastAPI endpoint? (Select all that apply)
14. FastAPI's dependency injection system allows reusing code across multiple endpoints.
15. What is the URL path for the ReDoc documentation interface in a default FastAPI setup?
16. Which status constant represents 'Created' in FastAPI's status module?
17. FastAPI automatically handles CORS without additional configuration.
18. Which features make FastAPI suitable for building APIs? (Select all that apply)
19. What is the default response format for FastAPI endpoints?
20. Which is NOT a core dependency of FastAPI?
Answered 0 of 0 — 0 correct