import requests proxy = { 'http': '125.123.137.2208:9999' } res = requests.get('http://httpbin.org/ip', proxies=proxy) print(res.text)