All quizzesEasy
Models & CRUD Basics — Series 3
Preview — 3 of 10 questions
A route receives HeroCreate(name="Ada"). Which object should it add to the Session to store a Hero row?
AA mapped Hero table instance built from the input
BThe HeroCreate class itself
CThe FastAPI route function
DThe OpenAPI schema dictionary
What is the difference between HeroCreate and HeroPublic in a CRUD API?
AThey must be the same physical table
BOne describes accepted input; the other describes returned fields
COne is only for DELETE and the other for PATCH
DBoth automatically issue SQL queries
A GET /heroes/7 route calls session.get(Hero, 7). What can the result be if no row has that key?
AA new unsaved Hero
BAll Hero rows
CNone
DA database migration
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.