Remix.run Logo
Lucasoato 4 days ago

Actually Pydantic could be extremely useful if used in conjunction with SQLAlchemy, check out the SQLModel library, from the very same creators of Pydantic.

cout 4 days ago | parent | next [-]

Having used sqlmodel recently for a project, I was underimpressed. Documentation was sparse, I found myself going to the source code to figure out how to solve problems I ran into, and I ended up dropping into sqlalchemy a lot more than I wanted. I think the idea is sound, but the code is hard to follow, and there are a lot of missing common cases.

iloveitaly 3 days ago | parent [-]

I agree. It still needs a lot of work and is a far cry from ActiveRecord.

I've been working on a wrapper around it to make it more usable, hoping to get as much of the work merged upstream into SQLModel:

https://github.com/iloveitaly/activemodel

Unfortunately, I just don't see a better option than SQLModel for ORM at this point.

jessekv 4 days ago | parent | prev | next [-]

Sebastián Ramírez created FastAPI and SQLModel, and was an early adopter of Pydantic. Samuel Colvin created Pydantic.

JackSlateur 4 days ago | parent | prev [-]

sqlmodel is a wrapper around sqlalchemy, made by the guy who made fastapi

While it uses pydantic, sqlmodel has not been written by those guys