[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-31 Thread Sydo Luciani
I got it working with adding additional foreign_keys. one inside backref for one direction, and one outside of backref for the other direction. so we need foreign_keys in both directions if using bidirectional relationship. Now I am able to insert into parent table, but getting sql error

[sqlalchemy] Re: AmbiguousForeignKeysError

2020-05-31 Thread Sydo Luciani
Never mind the OperationalError, I was missing inserting one of the required foreign key fields. The AmbiguousForeignKeysError was caused by missing foreign_keys in both side of direction and is resolved. Thanks On Sun, 31 May 2020 at 13:49, Sydo Luciani wrote: > I got it working with adding

[sqlalchemy] Re: Presenting a higher-level view of a physical table to the end-user

2020-05-31 Thread Mark Robinson
They will be developers, using Python/SqlAlchemy. Thanks. On Sunday, 31 May 2020 16:41:33 UTC+1, Jonathan Vanasco wrote: > > How will the end-users be querying? Are they going to be consumers who > are submitting params to a form, or are they going to be developers using > Python/SqlAlchemy? >

Re: [sqlalchemy] Re: Presenting a higher-level view of a physical table to the end-user

2020-05-31 Thread Mike Bayer
This seems straightforward, try reading through the tutorial at https://docs.sqlalchemy.org/en/13/core/tutorial.html which covers the basic idea. SQLAlchemy is designed first and foremost to present SQL statements as composable constructs that work like views, and that is what the select()

[sqlalchemy] Presenting a higher-level view of a physical table to the end-user

2020-05-31 Thread Mark Robinson
Hi there, we are considering using SQLAlchemy, specifically the Core part, for our project. I'm guessing we won't need ORM, but we keep an open mind. One of the things we would like to do is this: after connecting to a database (read-only), we would like to present to the end-user a view of a

[sqlalchemy] Re: Presenting a higher-level view of a physical table to the end-user

2020-05-31 Thread Jonathan Vanasco
How will the end-users be querying? Are they going to be consumers who are submitting params to a form, or are they going to be developers using Python/SqlAlchemy? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please