开发者

python and DB connection abstraction?

开发者 https://www.devze.com 2023-02-23 05:42 出处:网络
Is there some module to allow for easy DB provider configuration via connection string, similar to PHP\'s PDO开发者_高级运维 where I can nicely say \"psql://\" or \"mysql://\" or, in this python proje

Is there some module to allow for easy DB provider configuration via connection string, similar to PHP's PDO开发者_高级运维 where I can nicely say "psql://" or "mysql://" or, in this python project, am I just going to have to code some factory classes that use MySQLdb, psycopg2, etc?


http://www.sqlalchemy.org/docs/core/connections.html


There's something not quite as nice in logilab.database, but which works quite well (http://www.logilab.org/project/logilab-database). Supports sqlite, mysql, postgresql and some versions of mssql, and some abstraction mechanisms on the SQL understood by the different backend engines.

0

精彩评论

暂无评论...
验证码 换一张
取 消