insert_stmt = insert(Test).values(a=1, b=1)
print(insert_stmt.compile(dialect=mysql.dialect(), compile_kwargs={
    'literal_binds': True}))
Sqlalchemy - how to get raw sql from insert(), update() statements with binded params?