HTTPリクエスト
POSTでファイル送信
import requests str_data1 = '12345678' str_data2 = 'abcdefgh' file_path = 'C:\\path\\to\\file1.png' url = 'http://192.168.33.10/example.php' data = {'str_data1': str_data1, 'str_data2': str_data2} file = {'file': open(file_path, 'rb')} res = requests.post(url, files=file, data=data) print(res) print(res.text)