def peewee_sql_to_str(sql): return (sql[0] % tuple(sql[1])) insert_stmt = Pet.insert(name='Garfield') sql = insert_stmt.sql() print(peewee_sql_to_str(sql))