Most Sequel-like Python ORM? #2026
Replies: 3 comments 2 replies
-
What is compelling the client to choose: python vs another language? In my experience, it's unusual for them to be that specific about implementation........unless there are some cogent reasons I'm missing. Why not just use sequel rather than a python equivalent of sequel (if such a thing exists (?) - sorry but i can't help you here ), and convince the client of that? It's not the answer you're looking for, but it might be the most pragmatic. |
Beta Was this translation helpful? Give feedback.
-
I share that opinion. Everytime I'm forced to use some ORM for another language (and even ruby), I regret it. I don't have as much extensive XP as you may have in python, but I've been doing plenty of work in it. I can recommend you SQLAlchemy, it's definitely the best python has to offer. Coming from sequel, you will hate it. Coming from db-based experience in ruby, you'll hate python even more (I mean, the dbapi common to all python db tools, the fact that it implicitly opens a transaction on first use even if you just want to SELECT... why...). But it's still a decent query builder; a tad verbose, but it does the trick. It supports model-less usage, even if less documented. |
Beta Was this translation helpful? Give feedback.
-
Not sure how I missed this, but Sequel's eager loading, especially the tactical eager loading plugin, is a thing I've not seen elsewhere and I sorely miss in other ORMs (to the point I had to end up building it on top of DjangoORM to transparently fix N+1 performance problems on a legacy application) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a client that really wants their new backend in Python. I have extensive experience in Python, but have never found an ORM that compares to Sequel (actually this is true in every other language I've used...). I am not using Django; I will fall back to SQLAlchemy if needed. But I was wondering if anyone knows of a Python ORM that 'feels' like Sequel. For me that means:
null: false
, and it's sent to the DB, rather than only enforced by model validations.dataset_module
allows you to define methods that chain).association_dataset
as a dataset andassociation
as an Array removes so much confusion around when queries are reified.Because ORM problems often don't manifest until you're well past a tutorial, I'd love to hear from other Sequel fans of what Python ORMs they prefer. Or, if you've decided against an ORM entirely, what you did instead- I've looked at Python DB toolkits, and all of them have had pretty severe problems. I started to roll my own against psycopg2 but it was a lot of work so something off-the-shelf (and extensible) would be good.
Beta Was this translation helpful? Give feedback.
All reactions