MongoDB with Async Python Transcripts
Chapter: Foundations: Pydantic
Lecture: A Time of Change for Pydantic

Login or purchase this course to watch this video and the rest of the course contents.
0:00 You get started with Pydantic with just pip install pydantic. And you can find out more about them over at docs.pydantic.dev.
0:10 Here you can see on the page. Now, we're in a bit of an inflection point or a changeover in the Pydantic space.
0:19 And you can see right here this announcement on the website. Pydantic v2 alpha is available.
0:26 So, Pydantic is getting completely rewritten in an almost year-long project from being
0:34 based on Python to its core being based on Rust, which makes it about 22 times faster.
0:42 That is awesome and so many of these tools and frameworks that are built upon Pydantic,
0:49 as we'll see in this chapter, will benefit just automatically from that. However, in order for them to use the alpha stuff,
0:56 we've got to wait for it to get a little long, a little more down the development pipeline so things like FastAPI and Beanie and others
1:04 actually adopt those dependencies into their frameworks. So in this course, we're only gonna be using version one of Bidantic.
1:12 V2 is not really much of a big API surface change, but it is a really big runtime change. So that's big news that we have on the horizon coming,
1:23 but things are not ready yet for that in terms of integrating those with the libraries that depend upon Pydantic. So 1.10 is what we're using for now.
1:33 And I imagine over time, we'll update the course code to use version two when it goes for actual release. If you wanna hear the entire story
1:43 about this Pydantic version two update, I sat down with Samuel Colvin here on the left, the creator of Pydantic, as well as Sebastian Ramirez,
1:53 the creator of FastAPI here in the center, and talk to them at PyCon about what's coming with Pydantic and how it will affect libraries
2:01 that depend upon it like FastAPI. So you can check out the Talk Python to Me episode at the bottom using that link there,
2:08 which also links over to the YouTube video if you wanna watch the video version.


Talk Python's Mastodon Michael Kennedy's Mastodon