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 <ch...@simplistix.co.uk>wrote:

>
> Hi All,
>
> What's the correct way to find out what fields a model contains?
> (eg: one that's been reflected from an existing table)
>
> At this stage, I only care about the field names, if that makes things
> easier...
>
> Also, how would I do the same from a mapped object?
>
> cheers,
>
> Chris
>
> --
> Simplistix - Content Management, Zope & Python Consulting
>            - http://www.simplistix.co.uk
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to