Skip to main content

Better proxy!

Project description

Better Proxy

Telegram channel PyPI version info PyPI supported Python versions

Представление такой сущности, как proxy в виде класса.

  • Метод Proxy.from_str() поддерживает большинство форматом прокси (с протоколом и без):
    host:port:login:password
    host:port@login:password
    host:port|login:password
    login:password@host:port
    login:password:host:port
    host:port
    
  • Реализованы методы __hash__ и __eq__, что позволяет засовывть прокси в set()
  • Метод Proxy.from_file() возвращает список прокси из файла по указанному пути
pip install better-proxy

More libraries of the family:

import aiohttp
from better_proxy import Proxy
from aiohttp_socks import ProxyConnector


async def fetch(url):
    proxy = Proxy.from_str('socks5://user:password@127.0.0.1:1080')
    connector = ProxyConnector.from_url(proxy.as_url)
    
    async with aiohttp.ClientSession(connector=connector) as session:
        async with session.get(url) as response:
            return await response.text()

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

better_proxy-0.5.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

better_proxy-0.5.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file better_proxy-0.5.0.tar.gz.

File metadata

  • Download URL: better_proxy-0.5.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for better_proxy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 18673afaf9d3fbd240ec06fdd7b12259dc10b8bf70f26491f949b28cc659fee1
MD5 ca2a12befeb721ca19e4d855a9f681e7
BLAKE2b-256 ce2453a50ca0d7cc4b193bab8e8cb5e5dbb72e616132033c419ae59bd088e543

See more details on using hashes here.

File details

Details for the file better_proxy-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: better_proxy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for better_proxy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a82820009c128d352d6bff751c021cf1295f7eee8aea3e53423768737caf15ff
MD5 718c7be8fca8b7dece1ba379d3d7968c
BLAKE2b-256 46080760aeed04ea785e3f13538428c851e65cedad082d6530c5238d4be21b95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page