Skip to content

Glossary: Building APIs with FastAPI

Field

Also written: Field(...)

A function that adds rules or defaults to a model field, such as `Field(gt=0)` or `Field(min_length=3)`. SQLModel's version also takes column options like `primary_key` and `unique`.

Where the book teaches it

Related terms

QueryPydanticPrimary key