Let's say you want to iterate over the ORM attributes of an ORM class in sqlalchemy. So, you want a list of the ORM attributes. How do you get that list?
If the ORM class does not rename the attributes and thus the ORM attributes match the database columns, then you can use the solution from: https://stackoverflow.com/a/24748320/1023033 (btw, there is also a built-in (private) function _orm_columns() in the source code file /lib/sqlalchemy/orm/base.py that seems to provide this functionality)
But if the python ORM class has different names than the database columns (for example in these 3 ORM attributes):
>>> class User(Base):
... __tablename__ = 'users'
...
... id = Column('pkey', Integer, primary_key=True)
... name = Column('user_name', String)
... fullname = Column('human_name', String)
then that method does not work. So, how do you do get the python version of the ORM attributes?