3 ms·
SQLAlchemy is pretty sweet in the sense that you don't have to use the ORM, it has a non-ORM part that lets you write almost arbitrary SQL statements programmat
by ThePhysicist 6y ago
SQLAlchemy is pretty sweet in the sense that you don't have to use the ORM, it has a non-ORM part that lets you write almost arbitrary SQL statements programmatically. This often results in cleaner code than when writing those queries by hand (which you can also do in SQLAlchemy), so I prefer it to raw SQL. For things like database migrations I prefer raw SQL files though, as it's a bit painful to get edge cases right with tools like Alembic (haven't used if for two years though so maybe things got better).