Which SQL module to use?

Steve Bergman steve at rueb.com
Tue Oct 4 13:22:42 EDT 2005


mrstephengross wrote:

>I'd like to do some basic SQL stuff in Python. It seems like there are
>a heck of a lot of SQL modules for Python. What's the simplest and
>easiest one to use?
>  
>
The suggestion to use sqllite is probably a good one to get started.

I'm a PostgreSQL fan and use pygresql.  It has 2 modes:  "Classic" and 
"DBAPI 2.0". 

The DPAPI 2.0 interface makes your SQL portable between RDBMs.  But you 
can't beat the classic interface for simplicity, elegance, and convenience.

With classic, just pass a dictionary and say insert this or update this 
and its done.  With selects, its easy to get your results as a dictionary.

-Steve Bergman



More information about the Python-list mailing list