Re:Ask HN: Pydantic has too much deprecation. Why is it popu...
by scolvin on Tuesday January 09, 2024 @03:10PM
(#38931354)
That's simply not true. It's much faster than most similar libraries, 16x faster than DRF, 30x faster than Cerberus.
Msgspec is impressive in some ways, but there are good reasons to use Pydantic instead - for a start msgspec is written in a non-memory safe language by (mostly) one person, and is less widely tested than Pydantic.
I’d strongly recommend looking into msgspec. It is a much faster alternative and is largely “correct” in its implementation. It uses all of the python native type annotations without many hacks. Really it is much much faster and can actually be used for performance sensitive python workloads that need strong typing.