Summary
Congratulations! You've learned another important aspect of FastAPI: designing and managing data models with Pydantic. You should now be confident about creating models and applying validation at a field level, with built-in options and types, and also by implementing your own validation methods. You also know how to apply validation at an object level to check consistency between several fields. You also reviewed a common pattern, leveraging model inheritance to avoid code duplication and repetition while defining your model variations. Finally, you learned how to correctly work with Pydantic model instances in order to transform and update them in an efficient and readable way.
You know almost all the features of FastAPI by now. There is a last very powerful one for you to learn: dependency injections. These will allow you to define your own logic and values to directly inject into your path operation functions, as you do for path parameters and payload objects, which...