Skip to main content

Proxy Spinner

ProxyRotator is an straightforward, non-reliable, non-secure, but easy-to-use library for avoiding IP blocking by rotating free proxies on demand. It relies in services like ProxyScrape.com to get the proxies and rotate them on demand, and is subject to the availability of that service and the proxies it lists.

Installation

pip install proxy-spinner

Usage

from proxy_spinner import ProxySpinner
import requests

# Initialize the proxy rotator. By default it uses no proxy until you call renew_proxy
proxy_manager = ProxySpinner()
# Renew the proxy to use a new one. Could take a while to find a working one
found_proxy = proxy_manager.renew_proxy()

# Use the proxy in your requests within a context manager
with proxy_manager:
    response = requests.get("https://cmp.inmobi.com/geoip").json()
    print(f"PROXY ENABLED: You are at  {response['city']} ({response['country']}) "
          "[Proxy: {found_proxy}]")

# Without the context manager, the proxy is not used
response = requests.get("https://cmp.inmobi.com/geoip").json()
print(f"PROXY DISABLED: You are at  {response['city']} ({response['country']})")

Output:

PROXY ENABLED: You are at budapest (hun) [Proxy: 178.48.68.61:18080]
PROXY DISABLED: You are at ********** (esp)

Metadata

Release files for proxy-spinner 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for proxy-spinner 0.5
File Size Uploaded
proxy-spinner-0.5.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for proxy-spinner 0.5
File Interpreter ABI Platform
proxy_spinner-0.5-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / proxy-spinner-0.5.tar.gz

Download URL proxy-spinner-0.5.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1e2fce5568ba6607bdf0ae8048f7b3d8e8bd5ab4b0c81a54aeb791fcce88967a
BLAKE2b-256 checksum
How to use checksums
b4dc3941ffb66dbe290c3a768320eb89d28925ec30f04f2d3c9ef2340e8e0339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / proxy_spinner-0.5-py3-none-any.whl

Download URL proxy_spinner-0.5-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4b92ae25f5db95d75bd8f6386e91557ced70a5c8c9d7f0a6d675db9b21039e0
BLAKE2b-256 checksum
How to use checksums
e3a61027c0e0e49ddfdee2dc0c0619602afa3c95f9e0dfaf9d6e27bb687512d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page