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: 20190312.
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-4.1.2.tar.gz
(5.3 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ip-query-4.1.2.tar.gz.
File metadata
- Download URL: ip-query-4.1.2.tar.gz
- Upload date:
- Size: 5.3 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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8263377edc3b5568c3042d0a687e665c5dff54636dc0f684c0fdf537112ae47
|
|
| MD5 |
a12e720a681c29430c8b7fedaea33b7f
|
|
| BLAKE2b-256 |
b4f3e4ac4898f13be20cb4935008b24691e4e06e24d2aaea64c179681c6c807c
|
File details
Details for the file ip_query-4.1.2-py3-none-any.whl.
File metadata
- Download URL: ip_query-4.1.2-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.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbaf30eaac19c719adbbcc45b0fedcbc46e2a078587320eed035998162683e43
|
|
| MD5 |
4e73b879e4834010d02825e78a12f111
|
|
| BLAKE2b-256 |
32151620c981e2b37a0b2f8e4287081a6cf41257c7cd1a93672ca1d1fc15632b
|