PostgreSQL ILIKE query with SQLAlchemy
I think it should work
Post.query.filter(Post.title.ilike('%some_phrase%'))
http://docs.sqlalchemy.org/en/latest/orm/internals.html?highlight=ilike#sqlalchemy.orm.attributes.QueryableAttribute.ilike
For python 3.6 instead of '%' + some_phrase + '%'
you can write
Post.query.filter(Post.title.ilike(f'%{some_phrase}%'))