I'll forget it, so make a note
from sqlalchemy.sql.expression import literal
query = session.query(Table.column1, literal('sample_text'), Table.column2)
The following SQL is generated from this query
select column1, 'sample_text', column2 from Table;
Recommended Posts