StaffCoder
FastAPI
FastAPIFastAPI 0.139Python 3.13
7 modules · 28 challengesSign up
Modules7 modules · 28 challenges
Learn how FastAPI reads the values that arrive in the address bar: declaring them so they convert themselves, filling in the ones a caller leaves out, putting limits on what is allowed, collecting a parameter sent more than once, and binding a public name Python cannot spell.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Optional Search Filters

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers searching a store's product catalog with filters a caller may leave out, so an omitted filter falls back to a sensible default and a value that makes no sense is refused with a clear reason.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Constrained Query Rules

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers checking the search values a caller sends before they are used, so a term that is too short or a page size that is too large is refused rather than obeyed.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Repeated And Aliased Parameters

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers reading search options a caller may send more than once or spell with a hyphen, so repeating a filter narrows the listing by each value in turn instead of only the last.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Catalog Search Contract

STAR
Solving it completes the module
100%1 of 1 solvedeasy
About this challenge

This problem covers accepting a full set of search options from a caller, filling in the ones left out, refusing the ones that break a rule, and reporting back exactly which options the search ran with.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.