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: 20190122.

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-3.3.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

ip_query-3.3.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ip-query-3.3.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2

File hashes

Hashes for ip-query-3.3.0.tar.gz
Algorithm Hash digest
SHA256 ff1085b117d3d565f2795a2f223562fb1f71ca9de21d12e7aceb276f7ff6509f
MD5 ffbb6183d4e0b5cda94f8a126ee125c0
BLAKE2b-256 57439206e8708fecffab07f9911ace8d6e76c8030a8321a2263eeb38c2324633

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ip_query-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • 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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2

File hashes

Hashes for ip_query-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f657e258da24b5193df00328cbca4c05e63444c51d6d316061541d75b089e6b4
MD5 9c460c165492d166adec08a8d43c540a
BLAKE2b-256 cf8f115bd16f35f7fb400b25268e341be0cea3dba145ab4b32ac01fe6dd0329b

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