I've had exactly the same situation, ~2M MAU service with REDIS as the only persistence system, all data being JSON serialized Pydantic models. The storage overhead was just terrible and cost real money.
This would have been a super nice to have back then.
I wonder though how much sense it would make to get something like this mainlined into upstream Pydantic? as having this downstream would give many continuity and dependency lock concerns. And having it as part of the main library would significantly drive adoption rate.
Thanks, your Redis story sounds exactly like my motivation. When the cache layer becomes the primary persistence and you’re pushing around millions of JSON-encoded Pydantic objects, the overhead hits both RAM and the bill very quickly. That pain is real.
Regarding getting this into Pydantic core: I doubt the maintainers would want to ship and maintain a binary serialization layer inside the main project. That said, it might still be worth opening an issue to hear their perspective - worst case, it becomes a documented "won’t include".
As for continuity and lock-in concerns - my primary production workload depends on this library, so I fully intend to keep it updated alongside new Pydantic and Python releases. I also intentionally designed it with minimal dependencies: core functionality uses only pydantic and typing-extensions. The only extra is leb128, and that’s just for UInt128, which almost nobody truly needs - I’m considering moving that to an optional extra to keep the base install even leaner.
I had this literally happen to me a couple of months ago.
Slacking off while waiting for some performance tests to run (Shoutout to Locust.io!) with my big 27" screen full of terminals for each runner, server logs etc.
...And then on my laptop screen I honestly was just slacking off and reading Reddit.
'VP Of Technology' comes over "I dont know what you are doing, but it's the most impressive thing I've seen in a while".
Provision a VPS/VM/Cloud instance/etc, install your dev tools on it and use it over mush.
And remember for things like looking up git commands or even a lot of your dependency documentation, you do not need a web browser. Git comes with manpages, many libraries will have docs in .md or whatever in them.
The financing arm of a aristocratic line running a personality cult and who have a nepo baby on the cards contemplating a little bit of jyhad as his ticket out?
....I Do sometimes wonder who comes up with these names.