Skip to main content

Python library for manipulating proxies

Project description

pyproxychains

... потому что иногда нужно, чтобы запросы просто начали проходить.

Интерфейс

from python_proxychains import RoutingProxyAdapter

adapter = RoutingProxyAdapter.from_json("config.json")

# Decorator API
from python_proxychains.requests import proxied

import requests

@proxied(adapter)
def make_request():
    return requests.get("https://example.com")

make_request()

Больше примеров в examples.

Конфигурация

{
    "log": {
        "loglevel": "info"
    },
    "routing": [
        {
            "domain": [
                ".*\\.ru"
            ],
            "outbound": "direct"
        }
    ],
    "proxies": [
        {
            "tag": "proxy1",
            "protocol": "socks5",
            "url": "socks5://localhost:10808"
        },
        {
            "tag": "direct",
            "protocol": "freedom"
        }
    ],
    "pools": [
        {
            "tag": "pool1",
            "proxies": [
                "proxy1",
            ],
            "strategy": "RoundRobin"
        }
    ]
}

Разработка и тестирование

# Сборка библиотеки
uv build

# Запуск форматтеров
uv run black
uv run isort

# Тестирование
uv run pytest

# Проверка покрытия
uv run coverage run -m pytest
uv run coverage report

Участники

Проект выполняется Лагутиным Георгием и Заборовым Егором.

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

python_proxychains-0.1.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

python_proxychains-0.1.2-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file python_proxychains-0.1.2.tar.gz.

File metadata

  • Download URL: python_proxychains-0.1.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_proxychains-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1ab0d12041d2773924c2397f9f144cffad7563bfafe93daa30012eab066a8431
MD5 b6b7abe6911b91955fc691f242172da1
BLAKE2b-256 1d7824268bc511bd65c8ef611502f945d90ef5bfa0693838564fd3f23a86fdd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_proxychains-0.1.2.tar.gz:

Publisher: publish.yml on jtr1k/python-proxychains

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_proxychains-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_proxychains-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c4b450f198ea8227592ca51131bbc10dbc539f3c64b3110aa036dce4d621b5e
MD5 68916ee18bd53a0e2868d20022e93cdc
BLAKE2b-256 056ea13a7890dfb705dfc7f98a38c8a309659758de548fd9b65d5e9e694f1d1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_proxychains-0.1.2-py3-none-any.whl:

Publisher: publish.yml on jtr1k/python-proxychains

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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