Hacker News new | ask | show | jobs
by inspector14 893 days ago
I spent the last month or so migrating over a hundred models to v2 and it has been a pretty pleasant experience. Free performance gains and a lot more clear/readable models. On top of this interacting with complex nested root models is now much more organized and `.model_validate(data).model_dump()` always works whereas before I had to do a lot of strange json loading and dumping surrounding instantiation for certain models.

The changes are overall good and the library has matured into something that seems like it will be stable for a long time to come.

Spend an hour with this https://www.youtube.com/watch?v=ok8bF8M7gjk and never look back.

Also https://www.youtube.com/watch?v=4yUXPZGhIX8 specifically for migrating from v1 to v2.