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.0.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.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_proxychains-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6d778b04f51ac4f7229c028d9e27b11a76e3452687d593c4d562a7a29f57cee0
MD5 250660ce7b0e32bf21f7dd369f7d7bb2
BLAKE2b-256 f597dbb40bdb200ec2a224c6e783c856e80ff5b89f8cd59675349cda98248c44

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for python_proxychains-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69f2d4f7ecafff23ba8f16bc7820099d3b3457645a2c83bb14dd87d2b4243314
MD5 162fac384e6cf9e365cb27ca3dc9d042
BLAKE2b-256 220c6900fbc6bfaa8bdeee14aa10bfc15a294f2ccbeacd857c49790fdc7f3979

See more details on using hashes here.

Provenance

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