Re: [sqlalchemy] Best use of engine_from_config

2016-09-04 Thread Andrew Martin
That’s a really interesting approach, and I think I might try it. My concern here is whether I’m using things in the appropriate way. I think I’m failing to understand something about the way sqlalchemy works, and that’s the reason I’m asking this. For myself and for posterity. :) -andrew > On

Re: [sqlalchemy] Best use of engine_from_config

2016-09-04 Thread Michał Dobrzański
For Pyramid application I cache engines in global variable under connection string keys. I cache engines when they're created. This way each time I need to use the engine I reach to that dictionary instead of creating it with each request. On Sun, Sep 4, 2016 at 4:39 PM, Andrew Martin wrote: > I

[sqlalchemy] Best use of engine_from_config

2016-09-04 Thread Andrew Martin
I have a question about using creating engines along with pretty much any python web framework, but I'm specifically working with Pyramid. For obvious reasons. :) The sqlalchemy docs state this: "The typical usage of create_engine()