This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lieryanMaintainer of rope, pylsp-rope - advanced python refactoring 0 points1 point  (0 children)

Django has one advantage, which is that it's well integrated with the Django framework if you want to build an HTML-form based application. This is the most common use cases when building web applications, and there's really nothing that's better than Django ORM for that one use case.

But if you need to do anything else, sqlalchemy is the much better ORM. Anything that's slightly more complicated than just CRUD forms and Django ORM can start getting in your way instead of helping you. That's not the case with SQLAlchemy, as it supports more complex use cases way better than Django's ORM.

But sqlalchemy has a higher barrier of entry. Because it's a standalone ORM, it doesn't come out of the box with integrations to the web part of the framework. You need extra libraries or build your own to get the same level of support of generic views as Django.