pip install proxywhirl
from proxywhirl import ProxyWhirl
rotator = ProxyWhirl(proxies=["http://p1:8080", "http://p2:8080"])
response = rotator.get("https://api.example.com/data")
# Dead proxies auto-ejected ✓ | Slow ones deprioritized ✓ | Fast ones favored ✓
# Switch strategies on the fly
rotator = ProxyWhirl(strategy="performance-based")
rotator.set_strategy("geo-targeted", preferences={"US": [...], "EU": [...]})
| Strategy | Best For |
|---|---|
round-robin |
Even distribution |
random |
Unpredictable patterns |
weighted |
Favor reliable proxies |
least-used |
Even load balance |
performance-based |
Lowest latency |
geo-targeted |
Regional routing |
session-persistence |
Sticky sessions |
cost-aware |
Budget optimization |
composite |
Custom pipelines |
from proxywhirl import ProxyFetcher
# Grab 300+ validated proxies in seconds
proxies = await ProxyFetcher().fetch_all(validate=True)
|
Python API |
CLI |
REST API |
📖 Full Documentation
🎯 Strategy Guide
🤖 MCP Server
📓 Examples
GitHub · Issues · MIT License
Built with ❤️ for ethical web automation