Skip to main content

Python API for IP2Proxy database. It can be used to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits.

Project description

IP2Proxy Python Library

This library allows user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exits. It lookup the proxy IP address from IP2Proxy BIN Data file. This data file can be downloaded at

For more details, please visit: https://www.ip2location.com/ip2proxy/developers/python

Methods

Below are the methods supported in this library.

Method Name Description
open Open the IP2Proxy BIN data with File I/O mode for lookup.
close Close and clean up the file pointer.
get_package_version Get the package version (1 to 4 for PX1 to PX4 respectively).
get_module_version Get the module version.
get_database_version Get the database version.
is_proxy Check whether if an IP address was a proxy. Returned value:
  • -1 : errors
  • 0 : not a proxy
  • 1 : a proxy
  • 2 : a data center IP address
get_all Return the proxy information in array.
get_proxy_type Return the proxy type. Please visit IP2Location for the list of proxy types supported
get_country_short Return the ISO3166-1 country code (2-digits) of the proxy.
get_country_long Return the ISO3166-1 country name of the proxy.
get_region Return the ISO3166-2 region name of the proxy. Please visit ISO3166-2 Subdivision Code for the information of ISO3166-2 supported
get_city Return the city name of the proxy.
get_isp Return the ISP name of the proxy.

Requirements

  1. Python 2.2 and above

Installation

To install this module type the following:

pip install IP2Proxy

Support

Email: support@ip2location.com.
URL: https://www.ip2location.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

IP2Proxy-1.0.2-py3-none-any.whl (4.6 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