April 2025
Intermediate to advanced
530 pages
12h 39m
English
When working with complex codebases that continuously change by multiple contributors and when interacting with external services such as APIs or databases, you will want to follow best practices such as type safety in building your applications.
This chapter focuses on the importance of type safety when building backend services and APIs. You will learn how to implement type safety using Python’s built-in dataclasses and then Pydantic data models, and you will see their similarities and differences. In addition, you will explore how to use Pydantic data models with custom validators to protect against bad user input or incorrect data, and you will learn how to use Pydantic Settings for loading and ...
Read now
Unlock full access