[sqlalchemy] Re: introspecting models

2009-06-26 Thread phrrn...@googlemail.com
The MetaData object has a sorted_tables method/property that returns a list of Table objects. Also, MetaData.tables[] can be accessed by table-name (fully qualified including schema, if any). Table.columns has name and type information. Assuming a MetaData instance md, here is how you would list

[sqlalchemy] Re: introspecting models

2009-06-26 Thread Didip Kerabat
I believe you can look inside object's __dict__ for list of field names. There are plenty of information you can pull from orm.Mapper. Those are explained better here: http://www.sqlalchemy.org/docs/05/reference/orm/mapping.html - Didip - On Thu, Jun 25, 2009 at 6:12 PM, Chris Withers wrote: