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

Uploaded Source

Built Distribution

better_proxy-0.2.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: better_proxy-0.2.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for better_proxy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fb24df403cab590312e2349328a06ffcca75568feefd60bf02f02691a0e2d69d
MD5 3259f510fef00cc49046a0654664820f
BLAKE2b-256 6ebfa4c6b350f22c7f5e6d10985bc9319612a1dc04101de40b0cf3ecf3cf9dab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: better_proxy-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.6 Windows/10

File hashes

Hashes for better_proxy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b47b8b700eb22b180494113ef0959c6ab2264436fd9814850eb791df2f33beff
MD5 00c942cbb3aebf4328e70c18db7b2826
BLAKE2b-256 0c53f1065c3fb592778dbe685a8841f4f3732b648fe66cb6db03edbb4dc732c8

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