SQLAlchemy vs Django ORM

This cluster centers on comparisons between SQLAlchemy and Django's ORM, with users frequently recommending SQLAlchemy as a more powerful and flexible alternative for complex database queries in Python applications.

➡️ Stable 0.6x Databases
1,832
Comments
20
Years Active
5
Top Authors
#5793
Topic ID

Activity Over Time

2007
11
2008
20
2009
34
2010
51
2011
41
2012
92
2013
117
2014
117
2015
92
2016
90
2017
121
2018
56
2019
131
2020
102
2021
244
2022
77
2023
182
2024
105
2025
147
2026
2

Keywords

DB SQL DBMS DSL CRUD OK SqlAlchemy ORM NOT ActiveRecord sqlalchemy orm django sql queries layer query python string mapping

Sample Comments

aet Nov 12, 2013 View on HN

I'm curious of the relative advantages/disadvantages over something like sqlalchemy..

lucian1900 Mar 25, 2013 View on HN

But with SQLAlchemy instead of Django's relatively poor ORM.

the_mitsuhiko Jun 7, 2012 View on HN

I would still recommend SQLAlchemy :-)

exDM69 Nov 13, 2015 View on HN

I'll ask the inevitable question: how does this compare to SQLAlchemy ORM?

halayli Mar 23, 2012 View on HN

I wish Django uses sqlalchemy as the default ORM instead of inventing a squared wheel.

antihero Jun 26, 2012 View on HN

I've used both Django ORM and SQLAlchemy and they are generally excellent, allowing you to use SQL for anything that's just a bit too complicated for the ORM, but greatly simplifying day to day dynamically generated queries.

foota Nov 22, 2021 View on HN

Have you tried SqlAlchemy? I liked that it felt a lot more like writing sql, whereas Django feels like trying to force a different model on top.

freyr Aug 29, 2014 View on HN

SQLAlchemy is great, but SQL is also very expressive.

softwarelimits Nov 13, 2015 View on HN

Hi, looks very nice! Would you like to write about what are the main differences compared to sqlalchemy? Thanks!

varispeed May 13, 2021 View on HN

Why you cannot do with Django ORM that you can with SQLAlchemy?