Learning Pydantic: Advanced Data Validation In Python
What you'll learn
- Gain an in-depth understanding of what Pydantic is and how it is used
- Practice defining Pydantic data models using modern type hints, custom validations, and fine-tuned configuration
- Learn how to define complex, interdependent, and nested data models with Pydantic
- Serialize model instances into JSON and deserialize incoming data
- Practice using Pydantic in the context of building and deploying a real-world python web API
- Master relevant concepts in modern python application development, like dependency management and version control
Requirements
- Some basic experience with python would help but is NOT required
- A full-length introduction to Python is included as an optional Appendix
- A general willingness to learn is the only prerequisite as all relevant concepts will be explained as and when used
Description
Welcome to the best resource online for learning modern Pydantic, a data validation library that has taken the python community by storm.
Pydantic is was first released in 2018 and has since become one of the most popular python libraries. It is nowadays downloaded more than 130 million times a month, and is used by some of the largest organizations out there, from the tech giants like Google, Amazon, Apple, Meta, and Netflix, to large conglomerates in various other industries, such as Starbucks, JPMorgan Chase. Oh, and yes, even NASA.
There's a good reason for this. Pydantic is a powerful library that elegantly solves a very common problem in software development: data validation.
Pydantic's speed, simple declarative syntax, and extensibility make it an indispensable utility in modern python development.
And in this course, you will learn everything you need to know to get started with Pydantic, from the very basics of defining data models, to more advanced topics such as fields with factory defaults, creating custom model-validators, data serialization, and much more.
The first part of the course will be purely about pydantic, where we explore it in isolation. You will learn:
how to define data models with pydantic
how to compose more complex models from simpler ones via inheritance
the foundations of type hinting in python, including enumerations, literals, and other advanced types-
how to use pydantic's powerful validation system
how to serialize and deserialize data
how to extract models to schemas
how to validate data against pydantic models
Then in the second part of the course we will turn our attention to the Capstone Project, where we will use pydantic to develop and deploy a python web API that allows users to create and vote on polls. This app will use Redis as our durable key-value data store, and will be deployed to production as a serverless function.
The Capstone will be developed step by step, in a series of about 30 skill challenges, where you will be asked to incrementally implement small features. This will give you the opportunity to practice what you've learned in the first part of the course, and to:
get a practical feel for how Pydantic is used in real-world applications
learn about modern API development with python
understand what Redis is and how it can be used as a durable data store
learn about virtual environments and dependency management in python
practice using git and github
learn the basics of serverless computing by deploying the API as a serverless function
The course will use the latest version of Pydantic, which leverages the power of Rust to achieve blazing fast performance.
Also, if you're new to python or haven't used the used the language in a while, there's a full-featured python crash course included as an extra appendix which will get you up to speed in no time.
I'm very excited to share this with you, and I look forward to seeing you in the course!
Who this course is for:
- Anyone interested in learning about Pydantic
Instructor
Hi! I'm Andy, a freelance software developer and capital markets consultant based in Toronto, Ontario. I've spent close to a decade working with data, using code to automate business workflows, and consulting financial institutions on data-intensive applications.
Although I'm comfortable in a number of programming languages, for me nothing beats python on a ROIE (return on invested effort) basis. It is my go-to language in my consulting work and also my focus here on Udemy.
Aside from teaching, I specialize in consulting financial institutions in post-trade services technology.