StaffCoder
FastAPI
FastAPIFastAPI 0.139Python 3.13
7 modules · 28 challengesSign up
Modules7 modules · 28 challenges
Learn how FastAPI shapes what leaves your API: declaring a response model so internal values never escape, answering each outcome with the code it deserves, tuning how much of a record goes on the wire, and publishing the same contract in the generated description.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Filtered User Response

Sign up to unlock
—No data yeteasy
About this challenge

This problem covers deciding which parts of a stored user are safe to hand back, so passwords and internal notes stay inside the service while callers still get the details they need.

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

Correct Creation Codes

Sign up to unlock
—No data yeteasy
About this challenge

This problem covers answering each request with the code its outcome deserves, so a caller can tell a newly created thing from a plain success and a removal from a thing that was never there.

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

Serialization Tuning

Sign up to unlock
—No data yeteasy
About this challenge

This problem covers controlling how much of a record goes onto the wire, so a listing reports only what was actually filled in and a summary reports a fixed handful of fields for everything.

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

Accounts API Output Contract

STAR
Solving it completes the module
—No data yeteasy
About this challenge

This problem covers settling what an accounts API puts on the wire, so a list stays lean, a single account comes back complete, every outcome carries the right code, and the values meant to stay inside never leave.

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.