With sqlalchemy how to dynamically bind to database engine on a per-request basis

后端 未结 2 1001
生来不讨喜
生来不讨喜 2020-12-13 11:36

I have a Pylons-based web application which connects via Sqlalchemy (v0.5) to a Postgres database. For security, rather than follow the typical pattern of simple web apps (

2条回答
  •  温柔的废话
    2020-12-13 12:13

    I would look at the connection pooling and see if you can't find a way to have one pool per user. You can dispose() the pool when the user's session has expired

提交回复
热议问题