Brisk
Quiz
Practice. Learn. Score.
Home
🔍
🌙
🏆
Leaderboard
Login
IT
›
FastAPI
⏱
00:00
0/7 answered
Score: 0
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Question 1
What is the purpose of "async" database drivers, such as "asyncpg" for PostgreSQL, when used with a FastAPI application's async route handlers?
Automatically encrypts every single query sent to the underlying database
Automatically and permanently caches every single query result returned from the database
Is a strict requirement, since FastAPI is technically incapable of using a synchronous driver at all
Lets database queries run without blocking the event loop while waiting on I/O
Question 2
What is the purpose of FastAPI's "Annotated" type hint pattern, such as "item_id: Annotated[int, Path(gt=0)]"?
A deprecated, legacy syntax that has now been fully removed from recent FastAPI versions
Is only actually usable specifically within a Pydantic model, never a route function itself
A modern, standard way to attach FastAPI-specific metadata alongside a type hint
Automatically marks that specific parameter as being read from an HTTP request header
Question 3
What is the purpose of a FastAPI route's "response_model_exclude_unset" parameter?
Excludes any field from the response that happens to currently hold a null value
Excludes every single field from the response entirely, returning an empty body
Permanently prevents that specific response model from ever including any defaults
Excludes fields from the response that were not explicitly set by the client
Question 4
What is the purpose of FastAPI's "Header()" function/class, used to declare a parameter?
Declares a parameter as coming from an HTTP header sent with the incoming request
Declares a parameter as coming from the URL's query string instead of a header
Permanently restricts an endpoint so that it may only ever accept exactly one header
Sets a custom header on the outgoing response, rather than reading one from the request
Question 5
What does FastAPI do differently for a plain, synchronous "def" route handler, compared to an "async def" one, in terms of how it's actually executed?
Refuses to run it at all, since FastAPI technically only supports async handlers
Runs it directly on the exact same main event loop as an async handler would
Automatically and silently converts it into an equivalent async handler at startup
Runs it in a separate thread pool, so it doesn't block the main event loop
Question 6
What is the purpose of FastAPI's "include_in_schema=False" parameter, applied to a specific route?
Excludes that specific endpoint from FastAPI's automatic request data validation entirely
Permanently disables that specific endpoint entirely, so it can never actually be called
Excludes that specific endpoint from the automatically generated OpenAPI documentation
Automatically redirects any request made to that specific endpoint elsewhere instead
Question 7
What is the purpose of FastAPI's "response_model_exclude_none" parameter?
Excludes every single field from the response entirely, returning an empty response body
Permanently prevents that response model from ever including any field with a default value
Excludes any field from the response that was not actually explicitly set by the client
Excludes any field from the response that currently holds a null (None) value
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Share this quiz
𝕏
💬
f
in
🔗
📚 All Quizzes
Browse every category and see the full list of quizzes on BriskQuiz
→
🏠
Home
📚
Categories
🏆
Leaderboard
👤
Profile