Generating SQL queries in Python

Karl Schmid schmid at ice.mpg.de
Wed May 23 09:54:22 CEST 2001


Hi,

I am currently writing a python program that heavily interacts with SQL 
databases (PostgreSQL). The SQL queries are kind of hard-coded at many 
places in the program and need to be changed when the database structure 
changes (or when a different database system is used, e.g. MySQL).

I was wondering whether there is a solution available in python that allows 
to introduce an additional layer of functions for generating SQL queries so 
that the code can be more easily adapted to changes in the database 
structure or system.

Any information on modules or documentation dealing with this problem is 
welcome.

        Karl



-- 
----------------------------------------------------------------------
Dr. Karl Schmid                                  
Max-Planck-Institute for Chemical Ecology  
Carl-Zeiss-Promenade 10                         Tel: +49 3641 / 643658   
07745 Jena                                      Fax: +49 3641 / 643668
Germany                                       Email: schmid at ice.mpg.de
======================================================================



More information about the Python-list mailing list