News for hackers. Stuff that matters.
Re:Show HN: Prisma Python – A fully typed ORM for Python by probablyrobert on Monday February 21, 2022 @12:34PM (#30418361)
Yes it is similar to SQLModel however as SQLModel is based off of SQLAlchemy, the query API is not typed. That is the difference.
Re:Show HN: Prisma Python – A fully typed ORM for Python by klft on Monday February 21, 2022 @02:44PM (#30419748)
My understanding is that this is exactly what SQLModel adds on top of SQLAlchemy.

statement = select(Hero).where(Hero.age > 32).limit(3)

But I am only halfway through the tutorial so I might be wrong.

HN discussion of SQLModel here [1]

[1] https://news.ycombinator.com/item?id=28294534

Re:Show HN: Prisma Python – A fully typed ORM for Python by probablyrobert on Monday February 21, 2022 @02:52PM (#30419829)
My understanding of SQLModel is that it brings the benefits of both Pydantic and SQLAlchemy. The benefit of merging Pydantic with SQLAlchemy is that you can then use the database models directly in FastAPI route definitions.
Re:Show HN: Prisma Python – A fully typed ORM for Python by O5vYtytb on Monday February 21, 2022 @02:47PM (#30419779)
AFAIK SQLAlchemy 2.0 (coming soon?) will use a new system for full typing.
Re:Show HN: Prisma Python – A fully typed ORM for Python by probablyrobert on Monday February 21, 2022 @02:56PM (#30419858)
Yes I had heard about that but due to the nature of Python typing, they can't actually type the query API properly without falling back to Any, negating the benefits of type checking.
Re:Show HN: Prisma Python – A fully typed ORM for Python by BozeWolf on Monday February 21, 2022 @02:57PM (#30419870)
The creator of sqlmodel seems to be very busy with fastapi and other projects. Only so much you can do in a day, so progress is slowed down by that.

Prisma looks nice. Is it a solo project mostly? Or is there a company paying for your time to spend on this ORM? To me it is very important that such an important module as an ORM will have support for the lifetime of an application. Or at least when the app is still being developed.

Re:Show HN: Prisma Python – A fully typed ORM for Python by probablyrobert on Monday February 21, 2022 @03:00PM (#30419886)
Unfortunately this is a solo project, however I am in communication with the Prisma team and the core engine that Prisma Python uses is backed by Prisma.