Hi, I'm having some trouble with connection management in sqlalchemy. In my environment I have an already created connection with psycopg2, and some other components are still using it outside sqlalchemy.
I'd like create a new engine for sqlalchemy using the already created connection; without modifing it; letting other components of the environment working same as before. At the moment I'm creating engine this way: create_engine( 'postgresql+psycopg2://', creator = _getConn, poolclass=NullPool ) _getConn is a function returning the connection from psycopg2, already open. My problem is that seam like this engine is modifing default enconding of preexisting connection, and is changing default encoding of strings returning from it. I just want sqlalchemy use that connection without touching it, I also have connection pool managment at high level so I don't strictly need sqlalchemy managment with it. So I'd like sqlalchemy just use my connection, without even trying reopeing it. Would someone suggest me engine configuration or approach? Thanks a lot -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
