R

Ravina • 3.96K Points
Extraordinary

Q. What is the role of `BaseModel` in FastAPI?

  • (A) Defines database models
  • (B) Provides routing configuration
  • (C) Defines request and response schemas using Pydantic
  • (D) Handles authentication
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
`BaseModel` from Pydantic is used to define data models for requests and responses in FastAPI.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.