EasyProxies
A simple and fast library to interact with the proxyscan.io API to fetch free proxy servers.
Installation
Install via pip:
pip install EasyProxies
Install via Poetry:
poetry add easyproxies
Quick Start
Fetching Proxies (TXT Format)
Get a list of 20 proxies as ip:port strings:
from EasyProxies import Proxies, const
# Get 20 proxies in text format
proxies = Proxies.get(limit=20, format='txt')
for proxy in proxies:
print(proxy)
Integration with requests
If format='json' (default), the library returns a list of ProxyDescriptor objects. You can use their helper
properties to configure HTTP clients:
import requests
from EasyProxies import Proxies
# Get the best proxy available
best_proxy = Proxies.best()
# Use the as_requests_proxy helper property
proxies_dict = best_proxy.as_requests_proxy
print(f"Using proxy: {proxies_dict}")
try:
response = requests.get("https://httpbin.org/ip", proxies=proxies_dict, timeout=10)
print(response.json())
except requests.RequestException as e:
print(f"Connection failed: {e}")
API Documentation
Class Proxies
An interface to communicate with the proxy provider.
Methods:
-
get(**kwargs) -> list[ProxyDescriptor | str]Fetches a list of proxies matching the specified filters. -
raw_request(param: dict[str, str | int]) -> list[ProxyDescriptor | str]Performs the same function asget, but accepts a dictionary of parameters. -
already_list(type_: str) -> list[str]Returns a pre-assembled list ofip:portproxies for a specific protocol (e.g.,'http'). -
best(**kwargs) -> ProxyDescriptorReturns the fastest and most reliable proxy server found using the specified parameters. -
eternal_generator(**kwargs) -> GeneratorAn infinite generator for proxies. YieldsNoneif no proxies are found matching the filters. Parameters can be updated dynamically by passing a dictionary to the generator's.send()method.
Filtering Parameters (kwargs for get / best)
You can pass string values directly or use type-safe classes from EasyProxies.const.
| Parameter | Allowed Values | Description |
|---|---|---|
format |
'json', 'txt' |
Output format (JSON returns ProxyDescriptor objects). |
level |
'transparent', 'anonymous', 'elite' |
Anonymity level of the proxy. |
type |
'http', 'https', 'socks4', 'socks5' |
Proxy protocols (supports list/iterable of values). |
limit |
1 – 20 |
Max number of proxies to return. |
uptime |
1 – 100 |
Minimum reliability/uptime percentage. |
country |
Country code (e.g., 'US', 'FR') |
Filter by country. |
not_country |
Country code (e.g., 'CN', 'NL') |
Exclude specific countries. |
port |
Number | Filter by a specific port. |
ping |
Number | Max response time (ping) in milliseconds. |
last_check |
Number | Max seconds since the last proxy check. |
Structure of ProxyDescriptor
Represents a detailed representation of a proxy server returned in json format.
Attributes:
Ip:str— IP address.Port:str— Port.Host:str— Host string formatted asip:port.Ping:int— Response latency in milliseconds.Uptime:float— Connection success rate (uptime ratio).Anonymity:str— Anonymity level.Type:list[str]— Supported protocols.Location:Location— An object containing geolocation attributes (city,country,countryCode,isp, etc.).
Properties and Methods:
as_requests_proxy— Returns a dictionary compatible with therequestslibraryproxiesparameter.- Supports sorting and comparison based on failure state, ping latency, uptime, and anonymity level.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyproxies-2.0.2.tar.gz.
File metadata
- Download URL: easyproxies-2.0.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.13.14 Linux/7.1.2-zen1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192d27471a7d72c51ac80b1e25cf4c1683306bb4ed240e72642c926a9f4a681e
|
|
| MD5 |
20bc9a217347ef0174c4aa9b7fc2f245
|
|
| BLAKE2b-256 |
cb188a67a683c8e39a8b71cdb1f91afae78585e3e8abc535b92fb4d643a07bad
|
File details
Details for the file easyproxies-2.0.2-py3-none-any.whl.
File metadata
- Download URL: easyproxies-2.0.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.13.14 Linux/7.1.2-zen1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
715a89a4a8ca7f8d3826c255a13d0d6ef93dedf301aaa8bcc6a6264a877cca33
|
|
| MD5 |
38f2a740f4be48b112427b37acb67210
|
|
| BLAKE2b-256 |
a2c0a2af8b974c4f1411f64c7de8793ac8728bd4baa924ae8132c98afb50a818
|