Skip to content

Glossary: Building APIs with FastAPI

StringConstraints

A Pydantic helper that holds rules for strings, such as a `pattern`. It is used with `Annotated` to name a reusable type like `Category`.

Where the book teaches it

Related terms

AnnotatedField