How do I set the transaction isolation level in SQLAlchemy for PostgreSQL?
From Michael Bayer, the maintainer of SQLAlchemy:
Please use the "isolation_level" argument to create_engine() and use the latest tip of SQLAlchemy until 0.6.4 is released, as there was a psycopg2-specific bug fixed recently regarding isolation level.
The approach you have below does not affect the same connection which is later used for querying - you'd instead use a PoolListener that sets up set_isolation_level on all connections as they are created.