|
|
|
Ask HN: Is SQLAlchemy the industry standard Python ORM in 2023?
|
|
4 points
by jonjlee
1099 days ago
|
|
I'm starting a greenfield side project. I've only used Python in smaller projects without reason to hook up an ORM tool. In searching for choices now, the de facto standard seems to be SQLAlchemy, but I also see a number of references to Prisma[0][1] and other projects that claim to be a better, modern choice. What is the right choice for a brand new project at this time? [0] https://github.com/prisma/prisma [1] https://eash98.medium.com/why-sqlalchemy-should-no-longer-be-your-orm-of-choice-for-python-projects-b823179fd2fb |
|
Note that there are several types of technologies that can help connect an application to an SQL database:
- SQL builders: the best known project seems to be Pypika by Kayak (https://github.com/kayak/pypika) but it seems to be dead of sleeping. - ORMs that follow the active record pattern: Django's ORM is obviously the "standard" here, but you have to use Django. There are a few, alternatives, that are probably worth investigating if you want to use this pattern. - ORMs that follow the unit of work pattern: here I think SLQAlchemy ORM has very little competition.
An interesting discussion can be found here: https://www.youtube.com/watch?v=x1fCJ7sUXCM