Pydantic (V2) - In-depth Starter Guide

Опубликовано: 29 Октябрь 2024
на канале: MathByte Academy
14,550
504

In this video I show you how to use Pydantic V2, including topics such as default factories, custom serializers and custom validators. There is a whole lot more to Pydantic than what I can cover in a video such as this.

If you are interested in a deeper dive into Pydantic V2, please check out my Udemy course on the subject. Here is a discount coupon link (if it has expired, just let me know in the comments and I'll update it):

https://www.udemy.com/course/pydantic...

#pydantic #python

Content
=======
00:00 - Introduction
01:25 - Basic Models
07:28 - Validation Exceptions
09:56 - Deserializing Data
11:40 - Required vs Optional Fields
15:06 - Nullable Fields
22:20 - Aliases and the Field Class
25:42 - Serialization
27:21 - Field and Defaults
30:49 - Model Configuration - Populate by Name
33:11 - Mutable Defaults
35:01 - Default Factories
38:42 - Custom Serializers
48:56 - Custom Validators
1:02:32 - Nested Models
1:08:44 - Conclusion

Code for this Video
===================
Available in GitHub blog repo: https://github.com/fbaptiste/python-blog
Direct link: https://tinyurl.com/aantjwm5

My Python Courses
=================
Python 3 Fundamentals (introduction to Python)
https://www.udemy.com/course/python3-...

Pydantic V2: Essentials
https://www.udemy.com/course/pydantic...

Python 3 Deep Dive (Part 1 - Functional)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 2 - Iteration, Generators)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 3 - Hash Maps)
https://www.udemy.com/course/python-3...

Python 3 Deep Dive (Part 4 - OOP)
https://www.udemy.com/course/python-3...