I\'d like to run a query that selects all posts, case insensitive, that have titles that match \'%\' + [some_phrase] + \'%\'. That is, select all rows that have
\'%\' + [some_phrase] + \'%\'
For python 3.6 instead of '%' + some_phrase + '%' you can write
'%' + some_phrase + '%'
Post.query.filter(Post.title.ilike(f'%{some_phrase}%'))