getting columns attributes in declarative style with sqlalchemy

Hanss nospam at a.it
Wed Nov 2 11:15:27 EDT 2011


Il 01/11/2011 19.37, tres.bailey at gmail.com ha scritto:
>
> I'm no SQLAlchemy expert, but I have used the Table and Column attribute objects from the model object to solve a similar problem in the past.  You can use the following syntax to do it:
>
> [col.name for col in Country.__table__.columns._all_cols]

Thank you very much! This is exactly what I was looking for! Thanks!



More information about the Python-list mailing list