Skip to main content

No project description provided

Project description



pip install py-valid-proxy


import pprint
from py_valid_proxy import valid_proxy

"""Valid proxy server ('alive' or 'dead')

host : str
    IP Address
port : int
scheme: str, optional
    Scheme (default is 'http')
timeout: int, optional
    Connect timeout is number of seconds (default is 5 sec.)
    None if proxy is 'dead'
    dict if proxy is 'alive'
        "scheme": str, # http, https
        "host": str,
        "port": int,
        "export_address": list[str],
        "anonymity": str, # transparent, anonymous, high_anonymous # noqa
        "country": str # ISO Code 
        "response_time": float
proxy_info = valid_proxy('', 80, 'https', 10)
if proxy_info:
	print('is alive')
	print('is dead')
$ valid_proxy -l
Port: 80
Scheme: https
Response time: 0.51
Export address: []
Anonymity: transparent
Country : US ... alive

$ valid_proxy -l
INFO:py_valid_proxy.main: HTTPConnectionPool(host='', port=80): Max retries exceeded with url: (Caused by ProxyError('Unable to connect to proxy', ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f1219ed0750>, 'Connection to timed out. (connect timeout=5)'))) ... is dead

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

py_valid_proxy-0.2.5.tar.gz (3.1 MB view hashes)

Uploaded source

Built Distribution

py_valid_proxy-0.2.5-py3-none-any.whl (3.1 MB view hashes)

Uploaded py3

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