Hacker News new | ask | show | jobs
by true_religion 2150 days 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.

1 comments

I’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.