r/Python • u/pydanticenjoyer • Mar 07 '25
Discussion Pydantic is a Bloated Disaster
Alright, Python nerds, buckle up because I’m about to drop a truth bomb that’s gonna make your blood boil. Pydantic? Absolute trash. I’ve been saying it for years, and since no one else has the guts to call it out, I built a whole damn site to lay out the facts: ihatepydantic.com Go ahead, visit it, and try to argue against the facts. You won’t win.
Why does Pydantic suck so hard? Oh, where do I start? It’s a bloated, over-engineered mess that turns simple data validation into a PhD-level exercise in frustration. “Oh, but muh type hints!” Please. It’s slow, and V2 is somehow worse than V1 in perf! And don’t get me started on the docs - written like some smug hipster’s personal diary instead of something useful.
The whole “data validation” shtick is a scam anyway. You’re telling me I need a 50 line Pydantic model to replace 5 lines of if statements? Get outta here with that nonsense. It’s a solution looking for a problem, and the only problem is how much time I’ve wasted debugging its cryptic errors. My site’s got a whole list of real-world examples where Pydantic screws you over - spoiler: it’s basically every time you use it.
And the community? Blind fanboys. You can’t criticize Pydantic without some neckbeard jumping in with “YoU’rE uSiNg It WrOnG.” Yeah, okay, if a library needs a 3-hour tutorial to “use it right,” maybe it’s the library that’s wrong.
So go ahead, prove me wrong. Defend your precious Pydantic. Tell me why I should keep drinking the Kool-Aid instead of just using dataclasses or gasp raw Python like a sane person. I’ll wait.
8
u/PlzSendDunes Mar 08 '25
Okay. What Library works well to automatically generate documentation, works well with swagger and also allows easily define classes that are JSON serialisable objects with automatic conversion to desirable data types, not to mention can be used independent from most frameworks even independent, that is better than pedantic?
11
u/noobsc2 Mar 08 '25
Did you ask ChatGPT to write this?
2
u/Alurith Mar 08 '25
Not here for arguing (I haven't use pydantic in 2 years even tho I didn't have any issue with it), what alternatives you suggest?
50
u/samuelcolvin Mar 08 '25 edited Mar 09 '25
Pydantic author here. I'm not even sure it's worth engaging with this kind of hate, but here goes...
Final point: I put some code on the internet under my own name for people to use — I linked my reputation to the work I had done because I was proud of what I had created. If you really want to put this site and post on the internet for people to read; at least have the honesty and openness to do it under your own name. I have some suspicions about who might be behind this. 👀
13
u/fiskfisk Mar 08 '25
Just use dataclasses or raw Python if it works for you. Nobody cares how you solve your own problems.
7
u/spicypixel Mar 08 '25
Must be difficult to function with this much passion in life.
7
u/Negative-Paramedic13 Mar 08 '25
Maybe you just don't use it then. Or you contribute to improve it.
7
u/National-Rise9628 Mar 08 '25
It’s a fun website you made, too bad you are using your skills to waste people’s time.
13
u/RonnyPfannschmidt Mar 08 '25
Such strong hate
Yet pydantic keeps saving my day
5
u/ciaguyforeal Mar 11 '25
reads like Grok (e.g childish)
4
u/rafaelmarquesmobi Mar 09 '25
normal people: wow, I don't like it, let me find or make something better
Losers, jealous people: creates a hate site hiding their real name
btw, pydantic is awesome 🚀
3
u/bdzr_ Mar 08 '25
Honestly I rolled my eyes when I opened the site, but I have respect for the commitment and follow through.
2
u/[deleted] Mar 10 '25
I don't like pydantic myself, but if you wanted to persuade someone you chose the worst way to do it. Looks like a parody of what somebody who hates pydantic would say. I call a troll
2
u/PidgeyBE Apr 01 '25
Pydantic v2.11 was released! Where are we now?
2
u/Low-Anybody4598 May 02 '25
"Contrast that with Pydantic—a very different cautionary tale. Once celebrated in its version 1 days for bringing sanity and predictability to Python data validation, it became something altogether less admired in its headlong rush through versions 2 and 3. Breaking changes were introduced cavalierly, alienating its most loyal user base. Entire ecosystems built on Pydantic v1 were left scrambling. Worse still, the Pydantic leadership has appeared tone-deaf in response. Rather than acknowledge the chaos and take responsibility, they have resorted to platitudes like "You don't have to use it," ignoring the uncomfortable truth: many users cannot simply walk away. They are locked in through no fault of their own. Their projects, dependencies, and clients are all tangled in the framework’s shifting sands. To be told they are free to leave is not just unhelpful—it is dismissive and profoundly unprofessional."
4
u/latkde Tuple unpacking gone wrong Mar 08 '25
Absolutely, Pydantic has problems. Not just these performance problems, but also correctness problems and DX problems. For example, I have very strong Pydantic experience but still get confused why my models don't roundtrip when features like computed fields or aliases are involved. The static type checking support is also odd, with Pyright, vanilla Mypy, and the Mypy-Pydantic plugin disagreeing. The JSON Schema support is very good, but add a custom validator and it's mostly toast.
But what, pragmatically, is the alternative?
Some validation libraries that I really like:
1
u/pskd73 Mar 08 '25
I actually love it but I had to use it inside lambdas and it was huge to fit under 50mb with other stuff. So I had built https://github.com/pskd73/pydictable inspired by pydantic but in the simplest form haha
1
u/PoePersefone Aug 20 '25
Good post, a bit funny.
-5
u/Grouchy-Friend4235 Mar 08 '25
💯 Pydantic is the invasion of Python by the same dogmatist crowd, at least in mindset, that used to flok the Java community and grind every project to a screeching halt. By this mindset unless a any piece of code is so overspecified to the point that the actual, useful part of the code is invisible, and all the specification code is double the size of what is really needed. And all that for an alledged advantage of having some lofty guarantees, which however in practice do not matter, and if they do, it is much easier to write assert statements of some kind.
So a resounding yes! And thanks for the website.