Skip to main content

One doc tagged with "Pydantic"

View all tags

Request and Response Bodies: Pydantic models

Following our lesson on API Routing and HTTP Verbs for RESTful Endpoints, this article focuses on Request and Response Bodies: Pydantic models. Pydantic is a library for data validation and settings management using Python type hints. FastAPI uses Pydantic models to define the structure of request and response bodies, providing automatic validation and serialization.