From 103eff227432080f18c48234659c7a73ad758466 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 23 Apr 2023 06:39:21 +0000 Subject: automatic import of python-ip2location --- .gitignore | 1 + python-ip2location.spec | 941 ++++++++++++++++++++++++------------------------ sources | 2 +- 3 files changed, 477 insertions(+), 467 deletions(-) diff --git a/.gitignore b/.gitignore index 1d760c9..af1dd20 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /IP2Location-8.9.0.tar.gz +/IP2Location-8.10.0.tar.gz diff --git a/python-ip2location.spec b/python-ip2location.spec index ba0ff32..e6844d3 100644 --- a/python-ip2location.spec +++ b/python-ip2location.spec @@ -1,169 +1,172 @@ %global _empty_manifest_terminate_build 0 Name: python-IP2Location -Version: 8.9.0 +Version: 8.10.0 Release: 1 Summary: This is an IP geolocation library that enables the user to find the country, region, city, latitude and longitude, ZIP code, time zone, ISP, domain name, area code, weather info, mobile info, elevation, usage type, address type and IAB category from an IP address. It supports both IPv4 and IPv6 lookup. License: MIT License URL: https://github.com/chrislim2888/ip2location-python -Source0: https://mirrors.nju.edu.cn/pypi/web/packages/11/9c/4d3856df231385ab5bafe1df68d8a794afb49f6444e33035a514e3b34d4e/IP2Location-8.9.0.tar.gz +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/6b/23/10e7adb43bef86dbcd08d89e21cc5d69de94ee02b1b1a07dc6e6628babe5/IP2Location-8.10.0.tar.gz BuildArch: noarch %description -# IP2Location 8.9.0 - - -This is a IP2Location Python library that enables the user to find the country, region or state, city, latitude and longitude, ZIP code, time zone, Internet Service Provider (ISP) or company name, domain name, net speed, area code, weather station code, weather station name, mobile country code (MCC), mobile network code (MNC) and carrier brand, elevation, usage type, address type and IAB category by IP address or hostname originates from. The library reads the geo location information from **IP2Location BIN data** file. - -Supported IPv4 and IPv6 address. - -For more details, please visit: -[https://www.ip2location.com/developers/python](https://www.ip2location.com/developers/python) - -# Requirements - -1. Python 3.5 and above. - -# Installation - -1. Unzip the package. -2. Execute python setup.py build -3. Execute python setup.py install - -or - -To install this module type the following (for PyPI): - -```bash -pip install IP2Location -``` - -# Usage - -You can check the **sample.py** file to learn more about usage. - -## BIN Database - -Below is the description of the functions available in the **BIN Database** lookup. - -| Method Name | Description | -| ----------------- | ------------------------------------------------------------ | -| open | Open the IP2Location BIN data for lookup. Default mode: File I/O. | -| close | Close and clean up the file pointer. | -| get_all | Return the geolocation information in array. | -| get_country_short | Return the ISO3166-1 country code (2-digits) of the IP address. | -| get_country_long | Return the ISO3166-1 country name of the IP address. | -| get_region | Return the ISO3166-2 region name of the IP address. Please visit [ISO3166-2 Subdivision Code](https://www.ip2location.com/free/iso3166-2) for the information of ISO3166-2 supported | -| get_city | Return the city name of the IP address. | -| get_latitude | Return the city latitude of the IP address. | -| get_longitude | Return the city longtitude of the IP address. | -| get_isp | Return the ISP name of the IP address. | -| get_domain | Return the domain name of IP address. | -| get_zipcode | Return the zipcode of the city. | -| get_timezone | Return the UTC time zone (with DST supported). | -| get_netspeed | Return the Internet connection type. Please see [Internet Connection Type](https://github.com/[chrislim2888/IP2Location-Python](https://github.com/chrislim2888/IP2Location-Python)#internet-connection-type) for details. | -| get_idd_code | Return the IDD prefix to call the city from another country. | -| get_area_code | Return the area code of the city. | -| get_weather_code | Return the nearest weather observation station code. | -| get_weather_name | Return the nearest weather observation station name. | -| get_mcc | Return the Mobile Country Codes (MCC). | -| get_mnc | Return the Mobile Network Code (MNC). | -| get_mobile_brand | Commercial brand associated with the mobile carrier. Please visit [Mobile Carrier Coverage](https://www.ip2location.com/mobile-carrier-coverage) to view the coverage report. | -| get_elevation | Return average height of city above sea level in meters (m). | -| get_usage_type | Return the ISP's usage type of IP address. Please see [Usage Type](https://github.com/[chrislim2888/IP2Location-Python](https://github.com/chrislim2888/IP2Location-Python)#usage-type) for details. | -| get_address_type | Return the IP address type (A-Anycast, B-Broadcast, M-Multicast & U-Unicast) of IP address or domain name. | -| get_category | Return the IAB content taxonomy category of IP address or domain name. You can get a full list of IAB content taxonomy category from [here](https://www.ip2location.com/free/iab-categories). | - -## Web Service - -Below is the description of the functions available in the **Web Service** lookup. - -| Function Name | Description | -| ------------- | ------------------------------------------------------------ | -| Constructor | Expect 3 input parameters:
  1. IP2Location API Key.
  2. Package (WS1 - WS25)
  3. Use HTTPS or HTTP
| -| lookup | Return the IP information in array.