I believe in sqlalchemy scoped_session is used for this purpose.

http://www.sqlalchemy.org/docs/05/reference/orm/sessions.html#sqlalchemy.orm.scoped_session

example usage:

engine = engine_from_config(config)

session = scoped_session(
                sessionmaker(expire_on_commit = False,
                             bind = engine))



On Mon, Mar 22, 2010 at 6:43 PM, kworm <[email protected]> wrote:
> Hi, I'm new to Pylons and Python for that matter and I'm looking for
> the best way to handle thread safety for an ibm_db (DB2 CLI library
> interface) database connection in a Pylons app.  I have seen several
> older topics on this but not really a clear answer.  Any suggestions
> would be appreciated.
>
> Thanks,
>
> Kevin
>
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>



-- 
Thomas G. Willis

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to