Skip to main content

Python IP Query.

Project description

Python: IP Query

PyPi Version

IP Query, allow proxy.


$ pip3 install ip-query


from ip_query import ip_query

ip = ip_query()

you will get the result like this:

    'ip': '',
    '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(
        'http': 'socks5://',
        'https': 'socks5://',


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.

Files for ip-query, version 4.3.1
Filename, size File type Python version Upload date Hashes
Filename, size ip_query-4.3.1-py3-none-any.whl (5.6 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ip-query-4.3.1.tar.gz (5.5 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page