If you need the proper return type, just return session.query(MyObject).filter(sqlalchemy.sql.false())
.
When evaluated, this will still hit the DB, but it should be fast.
If you don’t have an ORM class to “query”, you can use false()
for that as well:
session.query(sqlalchemy.false()).filter(sqlalchemy.false())