new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

explore / Backend & APIs / mozg

FastAPI

Answer questions about FastAPI as documented today: path operations and parameters, request and response models with Pydantic, dependency injection, security and OAuth2 flows, middleware and CORS, background tasks, WebSockets, testing with TestClient, and deployment — with exact signatures and defaults.

1,344 notes across 5 brains · updated 2026-08-15 · trained 75%

since last sitting: +39 newly passed — this brain is learning · the verified changelog →

use this brain
# sign in to get a token
$ claude mcp add --transport http mozg \
https://mozg.sh/mcp --header "Authorization: Bearer …"
> use mozg/fastapi — …
Sign in — get this command with your token in it

New here? Sign in and this exact command appears with your token already inside — copy, paste into your terminal, done.

Or just add it

Sign in and add it, and every agent you have connected can read it — nothing to download, and it stays current as the author updates it.

Sign in to add it

Ask it things like

answers 36/48 on its latest exam · anti-bluff 3/3
How do you create a dependency that requires an active user?Dependency Injection
When both a response_model and return type annotation are present, which takes priority?Request & Response Models
How do you declare a background task in a path operation?Background Tasks
Can you declare dependencies on a group of path operations without repeating the dependency in each route?Dependency Injection
What is the purpose of Annotated in dependency declarations?Dependency Injection
Why does FastAPI deployment typically require a TLS termination proxy?Deployment
What is the difference between single container with single process and single container with multiple processes?Deployment
What parameters are required to configure CORSMiddleware?Middleware & CORS

What is inside

asking this brain searches all 4

What it can answer

48 coverage checks
75%
Answers 39 of the exam's 51 questionsIt answers 39 questions, 39 more than last time, out of an exam that grew by 51.Nothing it used to answer has stopped working.
Advanced Concepts6 / 6
Deployment6 / 7
Dependency Injection5 / 6
Request & Response Models5 / 5
Background Tasks3 / 3
Security & OAuth23 / 4
WebSockets3 / 4
Parameters2 / 4
Testing2 / 4
Middleware & CORS1 / 3
Path Operations & Decorators0 / 2
exam badge — share this score →

Attacks survived

re-run weekly · 2026-08-10
gate-battery12/12 known hostile payloads caught by the ingest gate
injection-corpusevery active note scanned — no steering language
secret-corpusevery active note scanned — no keys or credentials

heuristic scans against known attack classes — measured and dated, not a promise of unpoisonability

Inside

  • Custom operationId in OpenAPI with operation_id parameter · openapi
  • Custom content type in OpenAPI with openapi_extra · openapi
  • Custom OpenAPI request body schema without Pydantic parsing · openapi
  • OpenAPI Operation Object definition · openapi
  • Exclude path operation from OpenAPI schema with include_in_schema · openapi
  • Generate unique operationId from function names using generate_unique_id_function · openapi
  • Use form feed character to truncate docstring in OpenAPI · openapi
  • OpenAPI Extensions with openapi_extra · openapi
  • Extend OpenAPI schema with openapi_extra parameter · openapi
  • Response status code parameter in path operations · path operations & decorators
  • Deprecate a path operation · path operations & decorators
  • Response description parameter · path operations & decorators
  • Path operation decorator parameters configuration · path operations & decorators
  • Tags parameter for path operations · path operations & decorators

Licence

CC BY-NC-SA 4.0

Use it, copy it, build on it, with credit. Selling it is not allowed.