pydantic underneath (pydantic-base) is written in Rust. fastapi is fast cuz of pydantic. fastapi is extremely popular. Cuz it's right there in the word, fast. No matter how crap the usability is, the word fast will always win.
If fastapi is fast then whatever is not fastapi is slow. And there is no convincing anyone otherwise so lets not even try.
Therefore lets do fast. Cuz we already agreed slow would be bad.
normal dataclasses is not fast and therefore it's bad. If it had a better marketing team this would be a different conversation.
SQLModel combines pydantic and SQLAlchemy.
At first i feel in love with the SQLModel docs. Then realized the eye wateringly beautiful docs are missing vital details, such as how to:
-
create a Base without also creating a Model table
-
overload __tablename__ algo from the awful default
cls.__name__.lower()
-
support multiple databases each containing the same named table
#2 is particularly nasty. SQLModel.__new__ implementation consists of multiple metaclasses. So subclasses always inherit that worthless __tablename__ implementation. And SQLAlchemy applies three decorators, so figuring out the right witchcraft to create the Descriptor is near impossible. pydantic doesn't support overriding __tablename__
Then i came along
After days of, lets be honest, hair loss and bouts of heavy drinking, posted the answer here.
Required familiarity with pydantic, sqlalchemy, and SQLModel.
Why the commercial license for pngquant? Maybe rewriting pngcrush IP and slapping a commercial license on it is copyright infringement. This is my impression of Rust. Take others IP, rewrite it in Rust, poof copyright magically transferred. The C99 version how much of that is from prior art?
Lets just ignore prior art and associated license terms
pngquant commercial license
written by Kornel Lesiński
ImageOptim Ltd. registered in England and Wales under company number 10288649 whose registered office is at International House, 142 Cromwell Road, London, England, SW7 4EF
First commit Sep 17th, 2009
pngcrush license
Copyright (C) 1998-2002, 2006-2016 Glenn Randers-Pehrson
glennrp at users.sf.net
Portions copyright (C) 2005 Greg Roelofs