Re: [sqlalchemy] Database Type Attributes

2017-09-14 Thread Philip Martin
Mike, thanks for the prompt response and all of your work on the library. Looking over the generic_repr again it now looks more general. While not according for positional arguments, probably something like what I have below seems to work. I'm guessing by design we should expect the parameter

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Ankur Kumar
> > Sorry for late reply. I stucked somewhere else. Thank you very much. Now, i got the real issue. It was all because of local sessions. I'm abe to get correct output now. Thanks again, Ankur -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper

[sqlalchemy] Re: A "after flush before commit" event

2017-09-14 Thread Jonathan Vanasco
Is there a reason why you can't `flush` as the first action the `before_commit` event ? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See

[sqlalchemy] A "after flush before commit" event

2017-09-14 Thread mike
I'm writing a handler for the "before_commit" event that requires that all objects have primary key ids, and realizing that "before_commit" runs before the flush preceding a commit. Is there a way to have the handler run after the initial flush preceding a commit? Or, alternatively, have an

[sqlalchemy] A "after flush but before commit"

2017-09-14 Thread mike
I'm writing a handler for the "before_commit" event that requires that all objects have primary key ids, and realizing that "before_commit" runs before the flush preceding a commit. Is there a way to have the handler run after the initial flush preceding a commit? Or, alternatively, have an

Re: [sqlalchemy] Database Type Attributes

2017-09-14 Thread Mike Bayer
On Thu, Sep 14, 2017 at 10:49 AM, Philip Martin wrote: > We have several third-party vendors that provide us with large, normalized > schema (100+) tables. I am looking to quickly discover probable foreign keys > based on a column's name and data type attributes. > >

[sqlalchemy] Database Type Attributes

2017-09-14 Thread Philip Martin
We have several third-party vendors that provide us with large, normalized schema (100+) tables. I am looking to quickly discover probable foreign keys based on a column's name and data type attributes. For the data type attributes, I am looking to extract any attribute values set on the data

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Simon King
On Thu, Sep 14, 2017 at 12:07 PM, Ankur Kumar wrote: >> I'm reallly sorry. > > > Please also update line number 13 in api.py and api1_py as > > old : > output = session.query(model.Bug_Test.value).with_for_update('read').all() > > New: > output =

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Ankur Kumar
> > I'm reallly sorry. > Please also update line number 13 in api.py and api1_py as old : output = session.query(model.Bug_Test.value).with_for_update('read').all() New: output = session.query(model.Bug_Test.value).all() -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Simon King
On Thu, Sep 14, 2017 at 10:59 AM, Ankur Kumar wrote: >> Hello Simon, > > > Thanks, > I donot want to read uncommitted data. > > I want to read committed data by one API server from another API server. >> >> > > From another API server it keeps showing old data > Ah,

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Ankur Kumar
> > Hello Simon, Thanks, I donot want to read uncommitted data. I want to read committed data by one API server from another API server. > >From another API server it keeps showing old data -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/

Re: [sqlalchemy] Multiple front end server with Single MySQL database

2017-09-14 Thread Simon King
On Thu, Sep 14, 2017 at 10:03 AM, Ankur Kumar wrote: > I'm using Flask, sqlalchemy with MySQL database for my API server. > > It's working fine with one front end API server. > But now i want to increase a front end API server in my Load balancer. > > So, the scenario