url = 'http://your_url' files = {'file': open('myfile.test', 'rb')} r = requests.post(url, files=files)