4 ms·
SQLAlchemy has a great architecture, but it comes at the expense of being tied to the use case of accessing a relational database. Django models are more abstr
by true_religion 6y ago
SQLAlchemy has a great architecture, but it comes at the expense of being tied to the use case of accessing a relational database.
Django models are more abstract and anemic in querying, but it means you can use the same API and write access layers for non SQL databases. At work, we have an in memory database, and Elastic Search all queried in an identical way to the Postgres models.
- jsmeaton 6y agoI’d be super keen to see your ElasticSearch model implementation if you’re allowed to share it? For what it’s worth, I dislike the unit of work model that SQLA uses, but the layered architecture is enviable.