Re: [sqlalchemy] Handling multiple very similar tables

2020-06-06 Thread Richard Damon
Thank you for the pointers. The main usage of these will be in the UI to map the name of items from/into the users native language. One routine would from the items class call into this translation layer and lookup the names as desired in the specified language (with fall back code if such a trans

Re: [sqlalchemy] Handling multiple very similar tables

2020-06-05 Thread Mike Bayer
What's important here is how you would use these classes. that is, if you want to have them all laid out explicitly, and your code will do things like " session.query(Table157).all() ", that is, refer to them explicitly, versus these tables are all part of some kind of dynamic data structure, li

[sqlalchemy] Handling multiple very similar tables

2020-06-05 Thread Richard Damon
I am working on a project where I am using (and learning) SQLAlchemy (to an SQLite database if that matters) where I am seeing the need for a number of very similar tables, and would like to follow the DRY (Don't Repeat Yourself) principle if possible. Each of these tables will have 3 fields (actu