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.1.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

ip_query-4.3.1-py3-none-any.whl (5.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ip-query-4.3.1.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for ip-query-4.3.1.tar.gz
Algorithm Hash digest
SHA256 08eb381a8bb4c4b445259fc28ed337354eb2b793b7d1d762237d8506a15ad543
MD5 9d19922d5f2ccfad3addc6d03c1a3a60
BLAKE2b-256 01c2c8aa8fd6484ada15cb765165222b7d1b349fd3d37c14c7d0179329b3674b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ip_query-4.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for ip_query-4.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db418af680a97dccf801485d05ab86aa0c2d76a3bfbb330b92738ad6e7b1d3c6
MD5 0a70ee348163c53e5fa44c6f5d5cc8d3
BLAKE2b-256 a40d8a014d4d11a30cb460c0817c2af74eff3ef22bacaefcdbb9e78cf1091928

See more details on using hashes here.

Supported by

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