Integrations / Language
Use Proxys with Python httpx
Use Proxys with httpx, sync or async.
Steps
- Install httpx: pip install httpx.
- Pass the proxy URL to the client.
import httpx
with httpx.Client(proxy="http://USERNAME-country-us:PASSWORD@gw.proxys.co:8000", timeout=30) as c:
print(c.get("https://ipinfo.io/json").json())Before you start
Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.