Multiple Identical Tables in Flask-SQLAlchemy
问题 I'm creating a REST-like API to get data in and out of a legacy database. At the moment I don't have the option to alter the db structure. Nearly every table in the database has the exact same structure. Here's how I'm currently handling it using Flask-SQLAlchemy: class MyDatasetBase(object): timestamp = db.Column('colname', db.Float, primary_key=True) val1 = db.Column(db.Float) val2 = db.Column(db.Float) val3 = db.Column(db.Float) fkeyid = db.Column(db.Integer) @declared_attr def