Use this section when request data becomes application data: parse forms,
validate mutations, query SQLite or Postgres, and define verified
SQL-to-render data contracts. Each topic below is its own page — start with
Forms & Validation to handle a
POST, reach for the Database when you
need storage, and define Shapes when you
wantapp.check()to verify your SQL against your templates before you serve a
byte.
Async SQL access that maps rows to frozen dataclasses — SQLite built in, PostgreSQL via one extra.
Parse POST bodies into typed dataclasses, validate them in one pass, and re-render the form with errors.
Declare the SQL for a row next to the dataclass it fills, then verify at startup that your templates only read columns that SQL fetched.