the columns are stored in a `c` attribute of the table.

# available on both Class and Instance
[ i for i in p.__table__.c ]
[ i for i in Person.__table__.c ]

# also available using sqlalchemy.orm.class_mapper
# p = Person() instance
dict((col.name, getattr(p, col.name)) for col in 
class_mapper(p.__class__).mapped_table.c)

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to