Skip to main content

Python IP Query.

Project description

Python: IP Query

PyPi Version

IP Query, allow proxy.

Installation

$ pip3 install ip-query

Usage

from ip_query import ip_query

ip = ip_query()

you will get the result like this:

{
    'ip': '112.118.6.224',
    'country': 'Hong Kong',
    'country_code': 'HK',
    'asn': 4760,
    'aso': 'HKT Limited'
}

Behind a socks5 proxy? use like this:

from ip_query import ip_query

ip = ip_query(
    requests_proxies={
        'http': 'socks5://127.0.0.1:1080',
        'https': 'socks5://127.0.0.1:1080',
    },
)

Thanks

We've chosen GeoLite2 Country and GeoLite2 ASN from GeoLite2 Free Downloadable Databases..

Latest Version: 20190312.

Many thanks to MaxMind.

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

ip-query-4.3.0.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ip_query-4.3.0-py3-none-any.whl (5.4 MB view details)

Uploaded Python 3

File details

Details for the file ip-query-4.3.0.tar.gz.

File metadata

  • Download URL: ip-query-4.3.0.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.3

File hashes

Hashes for ip-query-4.3.0.tar.gz
Algorithm Hash digest
SHA256 61765004d51da636e175255a553bd86ed3685ff709eb07a3eb669abe6a1ee3bf
MD5 564b1230806e806b02238624a34a92bd
BLAKE2b-256 3057eb0dea0ab1858be12afdeef7ea6de6853803318c42f9bab32abf975aef3f

See more details on using hashes here.

File details

Details for the file ip_query-4.3.0-py3-none-any.whl.

File metadata

  • Download URL: ip_query-4.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.3

File hashes

Hashes for ip_query-4.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa5b0ef50d7790c4e63e0e9126289e2d47cfdd4551ac34c814ec6347b8e19050
MD5 8fa0e68464b596c9285e3f34cb7e1a52
BLAKE2b-256 bb6e324d330883f3445dfa0d80a371fc848b2efbce1d297777db20f8e810de9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page