Hacker News new | ask | show | jobs
by candl 4164 days ago
I don't use PHP at all, but one thing I envy PHP (and Perl) users is that they have excellent libraries to interact with SQL databases in the form of PDO (PHP) and DBI (Perl). There's no direct equivalent of this in Python which is a shame. The mantra in Python land is to use ORMs which I am not a fan of.
3 comments

Have you checked web2py with its DAL? you can get it also as a standalone module https://github.com/web2py/pydal Also there is db.py from yhat.
PyDAL (DAL) seems good on an initial look. I've just started exploring it, but recently wrote a post about publishing database data to PDF using PyDAL and xtopdf, my Python PDF creation library, here:

http://jugad2.blogspot.in/2015/01/publish-databases-to-pdf-w...

PyDAL is now a separate project and can be used without web2py.

I use both web2py and DAL on it's own as well. I really like the web2py framework. I started with django, but just wasn't as easy for me to pick up so I switched.
Who is claiming that every one should be using an ORM? Even SQLAlchemy can/should be used without the ORM.
I don't necessarily like it as much as DBI, but I find Cx_Oracle easy enough to use.