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-1.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

better_proxy-1.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: better_proxy-1.1.0.tar.gz
  • Upload date:
  • Size: 2.8 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-1.1.0.tar.gz
Algorithm Hash digest
SHA256 336dc2c5e7fe2fd762ae435c418dd1c4113163d648dd629cf8602ec8fc0c87a2
MD5 eac1733935c43da41ba75b5f8cedf2e0
BLAKE2b-256 89963cd1c24b09303295b44f4cc0c23bbfe0d4eac8414dadb02d6251c1753abf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: better_proxy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5fbbc0dda6750d835a6620393adb7d6778b897127afc9c42f5682142f7171d
MD5 5ef54f83d69d008eb33aa17a0b789395
BLAKE2b-256 4f9e172223db4db423c150a233ae0ee2fc00724e854dfb958be98bbd28ee927b

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