cls.query.filter_by(is_deleted = False, is_active = True).order_by(cls.created_at.desc()) sorting code example
Example: sqlalchemy order_by
from sqlalchemy import desc
someselect.order_by(desc(table1.mycol))
from sqlalchemy import desc
someselect.order_by(desc(table1.mycol))