Passing bind parameters to like
c.execute("select * from brands where brandname like %%%s%%",('ooba',))
(to find 'Foobar') won't work in all its variations.
What will work:
c.execute("select * from brands where brandname like %s",("%%%s%%" % "ooba"))