

Lesson 02 · 10 min
Path and query parameters
Types in arguments are both validation and conversion.
10 minLesson 2 of 9Practice includedAsk AI on any point
A function argument named like {item_id} in the path is a path parameter. Other simple arguments are query parameters. An int annotation makes FastAPI convert the string to a number, or return 422 with an explanation if it can't.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.