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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: better_proxy-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 9e6979abb361348efe0e389bbc21dc341e41851aac7b02263176cde76df5b3d7
MD5 d45d021847f1f2eb821aff11e383a8ad
BLAKE2b-256 205a66f271b265b950731980ee7bf8a7e8572e4eddc4f430ba4271d419f1cc3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: better_proxy-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d61ffeba3f1478b53faeccac7d9d9c2ea4923123fcc6a13f634a3536f324f7a
MD5 2e24a6f566e5311d82d7d015531897e3
BLAKE2b-256 308d634b8af5ad934ba433e53e66ed30269aaceb782cf8016b2dc6ffa9fcf3f4

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