send api request from python