AI Engineering
FastAPI Interview Practice
Practise FastAPI with multiple-choice questions in the style used in technical screening. Every answer comes with an explanation.
Free sets
Pro sets
Sample questions
1. Which decorator defines a GET route in FastAPI?
- A. @app.get
- B. @app.fetch
- C. @app.route
- D. @app.read
2. Which path declares a path parameter called item_id?
- A. @app.get('/items?item_id')
- B. @app.get('/items/{item_id}')
- C. @app.get('/items/:item_id')
- D. @app.get('/items/[item_id]')
Answers and explanations appear after you submit the full free set.