Talk Python To Me

#432: Migrating to Pydantic 2.0: Beanie for MongoDB

10.06.2023 - By Michael Kennedy (@mkennedy)Play

Download our free app to listen on your phone

Download on the App StoreGet it on Google Play

By now, surely you've heard how awesome Pydantic version 2 is. The team led by Samual Colvin spent almost a year refactoring and reworking the core into a high-performance Rust version while keeping the public API in Python and largely unchanged. The main benefit of this has been massive speed ups for frameworks and devs using Pydantic. But just how much work is it to take a framework deeply built on Pydantic and make that migration? What are some of the pitfalls? On this episode, we welcome back Roman Right to talk about his experience converting Beanie, the popular MongoDB async framework based on Pydantic, from Pydantic v1 to v2. And we'll have some fun talking MongoDB as well while we are at it.

More episodes from Talk Python To Me