Skip to main content

No project description provided

Project description

Proxy Provider

A friction‑free toolkit for discovering, vetting, and rotating free HTTP/SOCKS proxies.

PyPI

License: MIT

Tests


Why?

Open‑proxy lists are noisy and short‑lived. Proxy Provided automates the grunt work so you can focus on your crawler, data‑gathering script, or pentest without babysitting IPs.

  • Scrape → Validate → Store – Hundreds of public proxies tested in parallel and persisted locally.
  • Health‑aware rotation – Always hands you the least‑recently‑used proxy that’s alive and low‑latency.

Features

Capability Details
Scraping Built‑in scrapers for spys.me and free‑proxy‑list.net (easy to extend).
Health checks Concurrent checks via httpx; records RTT and marks dead proxies.
Rotation policy Least‑recently‑used → lowest latency, with on‑demand re‑probe.

Installation

pip install proxy‑provider           # CSV store + rotator

Quick Start

from proxy_provider import ProxyRotator
rotator = ProxyRotator()
for _ in range(100):
    proxy_url, latency = rotator.get_proxy()
    print("Using:", proxy_url, "with latency", latency, "ms")

As you can see, ProxyRotator returns both the proxy URL and its latency in milliseconds. Since open proxies are often slow, consider adjusting your timeouts based on the reported latency.

Refreshing the proxy database

proxy_provider ships with a ready-made list of proxies and their last-known status, but public proxies go bad quickly. Although ProxyRotator checks a proxy’s health every time it’s selected—and skips to the next one if it’s dead—everything runs faster when the database is already current.

Update all proxy records in a single step:

From the command line

proxy-provider scrape-and-update

From Python

from proxy_provider.db import scrape_and_update

scrape_and_update()

The command (or function) re-scrapes the proxy sources, tests each proxy, and writes the latest health and latency information back to your local store.


Testing

The project includes a test suite using pytest. To run the tests:

# Install dev dependencies including pytest
poetry install

# Run the tests
poetry run pytest

The tests verify the functionality of the ProxyRotator and the CsvStore:

For more details about the test structure and how to add new tests, see tests/README.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxy_provider-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proxy_provider-0.1.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file proxy_provider-0.1.1.tar.gz.

File metadata

  • Download URL: proxy_provider-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.10 Linux/5.15.0-139-generic

File hashes

Hashes for proxy_provider-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9e508cc9b4390a004f27fded167ce4b4622d4d9a307d9bf6464b5892eb1ced82
MD5 ef177cfbd22e1c5951fdca32885071a6
BLAKE2b-256 6a64de643999c1416162f249c942152a28827d4f1b2feab9ae6eb0f54404c028

See more details on using hashes here.

File details

Details for the file proxy_provider-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: proxy_provider-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.8.10 Linux/5.15.0-139-generic

File hashes

Hashes for proxy_provider-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b55a3f99c668e68783422cdd5ff0310facefc8373b5a05b7ad809a7078315584
MD5 2d191e3e0be398cfe9ee0da98f860015
BLAKE2b-256 6dd2a3ec74961e6968cc5a9436c567f9a8b8d844ade590d5f0c38ce90ce03dc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page