I am working in a pyramid project and I\'ve the table in SQLAlchemy in declarative syntax
\"\"\"models.py\"\"\"
class Projects(Base):
__tablename__ = \'proje
Would like to extend @zzzeek's answer. Indeed Query has column_descriptions
attribute but it's not available for all the methods.
Consider the following two queries:
1. query = session.query(Projects).filter_by()
2. query = session.query(Projects).all() <-- This query does not have column_descriptions.
So if you come across this situation where you need to use column_descriptions
attribute but using ...query(...).all()
then you can change it to ...query(...).filter_by()
i.e. filter_by()
without any filter condition.