doing sql things and python