So I wanted to introduce a friend to the wonderful world of python ORM libraries, which I still know little about.
Our databases are extremely fragmented and at times under normalized (for efficiency) and over normalized. Making "entities" out of it at this point is too much work (we have lots of legacy php code working with this) so the best I could think of was using sqlsoup to introspect our tables so he didn't have to write any mappers which he hated.
We liked the fact that selecting all columns and records from tables was easier this way, updating single items was also very easy since it could be done with a single query.
But everything else seems to take more code than custom SQL code, he wasn't thrilled when I couldn't select just a few columns, but what really bothered me is that even simple filters are more verbose. Example:
soup.mytable.filter_by(and_(soup.mytable.foo < 'x', soup.mytable.foo >= 'y'))
Is not easier than raw SQL (plus a custom querying object that does auto-escaping and such)...
mydb("SELECT * FROM mytable WHERE foo < $x AND foo >= $y", x='x', y='y')
Specially considering that we don't have to learn every MySQL function again. So except for the database agnosticism that we don't use, how can SqlAlchemy (or any Python ORM) make my life easier?