Rock Solid Python with Python Typing Transcripts
Chapter: Frameworks Built on Typing
Lecture: Pydantic Code Example

Login or purchase this course to watch this video and the rest of the course contents.
0:00 For our first hands-on exploration of one of these frameworks,
0:04 we're going to start with the one that is the foundation of many others, which is Pydantic.
0:09 So you come over here to Pydantic, the website, and they have a couple of examples.
0:14 A huge thing to pay attention to is there's Pydantic v1 and there's Pydantic v2.
0:19 The team spent probably almost a year rewriting this and refactoring it in a way that we could
0:26 keep our code running without much or any changes at all, but it's five to 50 times faster, which is pretty awesome.
0:33 So what we're gonna do is we're going to install Pydantic and use it to parse a few samples of data using Python type information.
0:43 We're gonna start with a simple one and then a way more complicated one, and I'll show you some cool tools to make that
0:49 maybe even the easier option as we'll see. So we're going to start working with Pydantic in our code, it's gonna be awesome.
0:57 This is one of my favorite frameworks. I'm sure you're gonna love it too.


Talk Python's Mastodon Michael Kennedy's Mastodon