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.4.tar.gz (8.3 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.4-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_proxychains-0.1.4.tar.gz
  • Upload date:
  • Size: 8.3 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.4.tar.gz
Algorithm Hash digest
SHA256 957c035cf70f5ad724009fcb618ea9a2156bf6c81954d79f57246ad35f404c7c
MD5 c03f7864a6997e6d40e4327fe4432332
BLAKE2b-256 5e8110109d6d08858c72a417e793042337c3b9d338946fb715f68006065ef7e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_proxychains-0.1.4.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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for python_proxychains-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e9a43720279e7bf727f70c074671bd08bbf9ccc201e82d34c2ac68b65a47d272
MD5 e9267d1f6cd778fb7ac3ae5142b08ea2
BLAKE2b-256 1fc6233a9fe232cb19339ee6d81a3819b5bd9215f047c5e345d1c23998c252ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_proxychains-0.1.4-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