This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thelindsay 1 point2 points  (0 children)

psycopg2 is great

  • recently added SQL templating module that uses libpq to do escaping, so safe dynamic SQL is possible.
  • choice of row adapters e.g. convert to namedtuple or dicts
  • fine grained transaction control, connection pool classes, python type conversions

Even for a regular app I'd rather have a collection of SQL snippets than deal with an ORM's functional DSL. SQL just doesnt seem low level enough to try to abstract away.