Loading the puzzle…
The puzzle IDE is built for a laptop or larger screen. You can read everything here, but selecting code is easier with a mouse and a wider window.
A dependency can be a generator function with a yield, and Depends accepts a
scope of "function" or "request" (the default, scope None, takes the request
stack). Consider an ordinary APIRoute, whose app is built by request_response
in fastapi/routing.py around the handler from get_request_handler, together
with solve_dependencies and _solve_generator in fastapi/dependencies/utils.py.
Comparing a yield dependency declared with scope="function" to one declared
with the default scope, when does the code after each yield run?
Select one option.
One of the listed options.
Each hint revealed before you solve takes 20 points off this puzzle's score.
Solve this puzzle to see the solution and a full explanation.
Pick one of the options.