Google News
logo
FastAPI - Quiz(MCQ)
What is the purpose of a FastAPI dependency?
A)
To define a database schema
B)
To handle incoming requests
C)
To validate request parameters
D)
To provide shared functionality between endpoints

Correct Answer :   To provide shared functionality between endpoints


Explanation : A FastAPI dependency is used to provide shared functionality between endpoints, such as authentication, authorization, or database connections.

Advertisement