Is there an equivalent for PHP PDO in Python?
My 开发者_如何学JAVAfavorite element of PHP is the PDO object. Is there a library or built in module for Python that can rival it?
Have you taken a look at Python Database Objects ?
pyodbc is probably the closest to it.
https://github.com/mkleehammer/pyodbc
pyodbc is an open source Python module that makes accessing ODBC databases simple. It implements the DB API 2.0 specification but is packed with even more Pythonic convenience.
I have not tried it myself yet but thought I would share after also bumping into this question.
精彩评论