Skip to main content

inproxy

A Python library to fetch free public proxies from multiple online sources, with support for filtering, concurrent fetching, and structured proxy data.

Installation

pip install inproxy

Quick Start

from inproxy import InProxy

proxy = InProxy()

proxies = proxy.fetch(count=10)

for item in proxies:
    print(item.proxy)

Filtering Proxies

You can filter proxies using location, network, anonymity, and latency attributes.

from inproxy import InProxy

proxy = InProxy()

proxies = proxy.fetch(
    count=10,
    country="India",
    country_code="IN",
    anonymity="elite",
)

for item in proxies:
    print(item.proxy)

Available filters:

Parameter Description
count Number of proxies to fetch
sites Specific proxy sources to use
country Filter by country
country_code Filter by country code
state Filter by state
state_code Filter by state code
city Filter by city
region Filter by region
continent Filter by continent
timezone Filter by timezone
isp Filter by ISP
organization Filter by organization
asn Filter by ASN
anonymity Filter by anonymity level
min_latency Minimum latency
max_latency Maximum latency

Note: Filtering depends on the metadata provided by each proxy source. Sources that do not provide a particular field cannot satisfy a filter on that field.

Selecting Proxy Sources

By default, inproxy uses all configured sources.

You can specify individual sources using their names:

from inproxy import InProxy

proxy = InProxy()

proxies = proxy.fetch(
    count=20,
    sites=["proxyscrape", "geonode", "iproyal"],
)

for item in proxies:
    print(item.proxy)

You can also provide multiple source names as a comma-separated string:

proxies = proxy.fetch(
    count=20,
    sites="proxyscrape,geonode,iproyal",
)

Working with Proxy Objects

Each result is a structured Proxy object.

from inproxy import InProxy

proxy = InProxy()
proxies = proxy.fetch(count=5)

for item in proxies:
    print("Proxy:", item.proxy)
    print("IP:", item.ip)
    print("Port:", item.port)
    print("Protocol:", item.protocol)
    print("Country:", item.country)
    print("Country Code:", item.country_code)
    print("Anonymity:", item.anonymity)
    print("Latency:", item.latency)
    print()

Proxy URL

The .proxy property returns the proxy in URL format:

http://192.168.1.10:8080

The protocol and port are taken from the proxy data.

Convert to Dictionary

Use to_dict() to convert a proxy object into a dictionary:

proxies = proxy.fetch(count=5)

proxy_data = [item.to_dict() for item in proxies]

print(proxy_data)

Each dictionary includes the proxy fields and the formatted proxy URL.

Using Proxies with Requests

import requests
from inproxy import InProxy

proxy = InProxy()
proxies = proxy.fetch(count=1)

if proxies:
    proxy_url = proxies[0].proxy

    response = requests.get(
        "https://httpbin.org/ip",
        proxies={
            "http": proxy_url,
            "https": proxy_url,
        },
        timeout=15,
    )

    print(response.text)

Configuration

You can configure the number of concurrent source workers and the timeout used for source requests:

from inproxy import InProxy

proxy = InProxy(
    source_workers=20,
    source_timeout=5,
)

proxies = proxy.fetch(count=10)
Parameter Default Description
source_workers 20 Maximum number of concurrent source workers
source_timeout 3 Timeout in seconds for source requests

Important Notes

  • Proxies are collected from public third-party sources.
  • Proxy availability and response times can change at any moment.
  • Not every source provides complete proxy metadata.
  • A requested number of proxies is a target, not a guarantee. The returned list may contain fewer results.
  • Public proxies are unreliable and should not be used for sensitive information or credentials.

Requirements

  • Python 3.10 or higher

License

This project is licensed under the MIT License.

Metadata

Release files for pyinproxy 0.1.1

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

Source distribution (sdist)

Source distribution for pyinproxy 0.1.1
File Size Uploaded Provenance Actions
pyinproxy-0.1.1.tar.gz 19.4 kB With provenance Details for pyinproxy-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyinproxy 0.1.1
File Interpreter ABI Platform Actions
pyinproxy-0.1.1-py3-none-any.whl Python 3 none any Details for pyinproxy-0.1.1-py3-none-any.whl

Total release size: 37.0 kB

Release files / pyinproxy-0.1.1.tar.gz

Download URL pyinproxy-0.1.1.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fbe662eb65828dac54c5eb45726e492dba01ffc5629f0eb51e016c92b61aaca2
BLAKE2b-256 checksum
How to use checksums
95d8b15eda0f8d7ebb03c8a192b81954d61ed088fd76fa08933b6a0b42224fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / pyinproxy-0.1.1-py3-none-any.whl

Download URL pyinproxy-0.1.1-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b105baacc339fe5dd2adad5e9953dc63423b07205cd1d583280f3140ade0df5
BLAKE2b-256 checksum
How to use checksums
25e1b13ea23e9c675544f05fbebb1b642110d3c930f3ff42693890ce09b529a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for pyinproxy 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyinproxy-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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