iploc

module
v0.0.0-...-cc9699b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: MIT

README

iploc

Test codecov

Web service that identifies the country, region or state, city, latitude and longitude, ZIP/Postal code, and timezone based on an IP address (IPv4 or IPv6).

Features

  • Reduces CPU and RAM utilization by using a binary search algorithm on smaller chunks of a large raw data file, which has been pre-split

  • Auto downloading a database and preparing it for use, using a IP2Location Download Token

Example

Search location:

curl http://localhost/search?ip=8.8.8.8

Output:

{
  "Code": "US",
  "Country": "United States of America",
  "Region": "California",
  "City": "Mountain View",
  "Latitude": "37.405992",
  "Longitude": "-122.078515",
  "ZipCode": "94043",
  "TimeZone": "-08:00"
}

See requests.rest.

Acknowledgment

This site or product includes IP2Location LITE data available from https://lite.ip2location.com.

Directories

Path Synopsis
cmd
app
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL