Why the f**** there is nothing like DBI in Python? In Perl there is DBI, great library with many drivers to almost all database engines you can imagine (all can be found here: DBD). There are many drivers for normal databases such as PostgreSQL, Firebird… other databases like: Oracle, MSSQL, MySQL… and some like this: Amazon E-Commerce Services API or A class for DBI drivers that act on Excel File.
All that allowes me to use any database that I want with a really nice API and even load data from one database to another (exactly this is how dbi-link for PostgreSQL works).
In Python that’s a little bit different. There is, let’s say: The Nightmare. Python Database API Specification v2.0.
- How can I prepare a query and later execute that?
- Why there isn’t any way to have one function that returns an object of one class… configured according to the connection settings (just like in Perl’s DBI)?
For PostgreSQL there is ONE driver in the Perl’s DBI. In Python there are… just to many drivers and all are somewhat bad. Discussion on the PostgreSQL mailing list didn’t give me any hope that it will change in the near future.
I don’t want to use any ORM for what I write now, but I started writing that in Python and my main testing platform is PostgreSQL… well… I think this is the time to change something because programming using Python and databases without orm is a little bit frustrating.
Related posts:
- Testing Database – Small Reply On Ovid’s blog I found lately this entry. First of...
- PostgreSQL Collation – part 1 PostgreSQL is (IMHO) much better than MySQL but unfortunately it ...
- How to Load SQL File to Database It would be nice to have the possibility of loading...
- Why Use ORMs? Why Use ORMs? ORM aka Object Relational Mapping is a...
- PostgreSQL Wishlist PostgreSQL is a great database, in my opinion much...
- Naming Convention aka PHP vs Python Is Python really better than PHP? I doubt, and in...













0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.