On 3/30/06, Gregory P. Smith <[EMAIL PROTECTED]> wrote:
> Getting off on a tangent here, but I would actually
> like some decent way of writing SQL queries in Python --
> not for importing, but for database access.
>
> Constructing bits of SQL out of character strings
> sucks *extremely* badly.

Have you looked at SqlObject?  (and its associated modules
sqlobject.sqlbuilder in particular)

SQLAlchemy (www.sqlalchemy.org ) is also nice, in particular for more complex setups. I found it scales much better to the insanely complex SQL queries that our home-grown PostgreSQL/Perl setup needs, and it handles transactions the same way as our home-grown ORM too. There's plenty of ways to reliably and sanely avoid typing actual SQL in Python.

--
Thomas Wouters <[EMAIL PROTECTED]>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to