October 2021
Intermediate to advanced
426 pages
8h 16m
English
This chapter will cover in more detail the definition of a data model with Pydantic, the underlying data validation library used by FastAPI. We'll explain how to implement variations of the same model without repeating the same code again and again, thanks to class inheritance. Finally, we'll show how to implement custom data validation logic into Pydantic models.
In this chapter, we're going to cover the following main topics:
To run the code examples, you'll need a Python virtual environment, ...
Read now
Unlock full access