[Flask] flask-SqlAlchemy question

Ben Duncan linux4ms at gmail.com
Mon Aug 19 09:25:29 EDT 2019


Ok, i'm trying to use the flask-sqlalchmey
I am trying to load a single table without having to do a reflect:

Code:
pgdb = SQLAlchemy(app)
# Get our Company Stuff
pgdb.Model.metadata.reflect(pgdb.engine)
class comp_table(pgdb.Model):
    __table__ = pgdb.Model.metadata.tables['company']
#

I'd rather do something like:

comp_table = pgdb.Model.metadata.tables['company']
rather the load everything thru reflect

Is there a way to do this ?

Thanks

*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20190819/ac7feb66/attachment.html>


More information about the Flask mailing list