You would probably do better with a pattern where you have a Session for 
every request , and just use that session.  That is how most people 
implement SqlAlchemy for web.

    * request start
    * create a sqlalchemy session, either scoped or explicit
    * do things with your session : read , write, etc.
    * commit/rollback session
    * request close; cleanup with a session.remove or session.close 

Here are two great pieces from the documentation:

* 
http://docs.sqlalchemy.org/en/latest/orm/session.html#session-frequently-asked-questions
* 
http://docs.sqlalchemy.org/en/latest/orm/session.html#using-thread-local-scope-with-web-applications




-- 
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 http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to