3 ms·
SQLAlchemy 1.4.0 Released – featuring major rethink of the APIs in Core and ORM
- scrollaway 6y agoMan, I'm gonna give SQLAlchemy another try after this release i think. I've not been able to shake the simplicity and intuitiveness of the Django ORM. The fact is in most apps you just need the basic stuff. But you do hit the limitations too quickly. SQLAlchemy always felt like too big/crufty a tool to use at the early stages. OTOH when I've wanted to make serious sql-based tools it's been invaluable. I hope it'll lend itself better to the simpler use cases, I'd love to switch my default backend stack to FastAPI with SQLAlchemy.
- rovr138 6y agoThere was a good discussion here a couple weeks back if you’d like to check it. The author jumped in too, https://news.ycombinator.com/item?id=26182744 https://news.ycombinator.com/item?id=26182744
- iainctduncan 6y agoIMHO once you understand it well, even for simple things the Django ORM will drive you nuts. It's just a really limiting design compared to SQLAlchemy's data mapper.
- jackhalford 6y agoI've been using plain sql, materialized views with postgrest for network endpoints. Therefore I don't need to maintain a backend. Is there any compelling reason to try out an ORM?
- beckingz 6y agoSanitizing SQL injection?
- jackhalford 6y agoAll requests are going through postgrest's http layer [1]. [1] https://postgrest.org/en/v7.0.0/ https://postgrest.org/en/v7.0.0/
- inshadows 6y agoSQL injection where exactly? db.execute('select * from t where name = ?', ['Joe'])
- remram 6y agoIf you're doing fine without an ORM, don't bring one in. ORMs bring some user-friendliness and other niceties, but might drive you crazy by their strictness (objects lifetimes are bound to a session, it is harder to fetch/update parts of an object/relation, async is much more difficult because of lifetimes again, still need to take a look at generated queries to spot performance issues, ...). I am myself in the process of moving from the ORM to the core, because while I need the multi-backend support (including migrations), the ORM is proving too tricky for an app that's growing beyond simple CRUD.
- zerkten 6y agoI think you should try out the ORM outside the context of your application to get some familiarity. I don't think you should foist it on your existing app for no reason. Learning SQLAlchemy is a solid investment if you are working with Python and are going to be working with relational databases.