query mysql for python