Skip to main content

Proxy IP Object definition.

Project description

https://img.shields.io/badge/License-GPL%20v3-blue.svg https://badge.fury.io/py/be-proxy-ip.svg https://img.shields.io/travis/Gatsby-Lee/be-proxy-ip.svg

BE Proxy IP

Defining Proxy IP object

How to install

pip install be-proxy-ip

How to init ProxyIP object

Using ProxyIP init

>>> from be_proxy_ip import ProxyIP
>>> p = ProxyIP(proxy_ip='1.2.3.4',
....    proxy_port=8888,
....    proxy_username='hello',
....    proxy_pwd='doyouknow',
....    request_ip='1.2.3.4')
>>> print(p)
ProxyIP(proxy_ip='1.2.3.4', proxy_port=8888, request_ip='1.2.3.4', proxy_id=-1, num_ok_requests=0, num_banned_requests=0, num_timedout_requests=0, proxy_username='hello', proxy_pwd='*********', counted=0)

Using ProxyIP.create_from_tuple

Order in PROXY_INFO tuple

  1. proxy_id

  2. proxy_ip

  3. proxy_port

  4. proxy_username

  5. proxy_pwd

  6. last_request_time

  7. num_ok_requests

  8. num_banned_requests

  9. num_timedout_requests

  10. counted

  11. request_ip

>>> PROXY_INFO = [
...     1, '1.2.3.4', 3999, 'hello-proxy', 'hellop-proxy-pwd',
...     -1, 11, 22, 33, 44, '4.5.6.7'
... ]
>>> from be_proxy_ip import ProxyIP
>>> p = ProxyIP.create_from_tuple(PROXY_INFO)
>>> print(p)
ProxyIP(proxy_ip='1.2.3.4', proxy_port=3999, request_ip='4.5.6.7', proxy_id=1, num_ok_requests=11, num_banned_requests=22, num_timedout_requests=33, proxy_username='hello-proxy', proxy_pwd='****************', counted=44)

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

be-proxy-ip-1.2.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

be_proxy_ip-1.2.0-py3-none-any.whl (15.9 kB view hashes)

Uploaded Python 3

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