Re: [sqlalchemy] Engine connection

2016-10-18 Thread Mike Bayer
On 10/18/2016 04:03 AM, Daniele Senigagliesi wrote: 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

Re: [sqlalchemy] Selective logging using the ORM for a single thread. Can't do it, therefore can't debug our app.

2016-10-18 Thread Mike Bayer
On 10/17/2016 11:33 PM, Alfred Perlstein wrote:ith the community. Adding a snippet like this to my app was very helpful, however I'm wondering if there's something I'm missing that may cause a catastrophe? I'm looking at maybe making it useful for detecting if a new piece of code happens to

[sqlalchemy] Engine connection

2016-10-18 Thread Daniele Senigagliesi
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

[sqlalchemy] Re: JOIN result as dict

2016-10-18 Thread Joasia
q.all() returns me a result in format: [('one', {'t2c2': 'qwe', 't2c1': '11', 't2c3': '1'}), ('two', {'t2c2': 'rty', 't2c1': '22', 't2c3': '2'}), ..] The result of q.all()._asdict() is [{ 't1c2': 'one', 'table2': { 't2c2': 'qwe', 't2c1': '11', 't2c3': '1' } }, {