Python IP Query.
Project description
Python: IP Query
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
Release history Release notifications | RSS feed
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 hashes)