Skip to main content

IPGeo-Search is a python module which allows for easy use of the IPGeo API. It allows both free and paid users to send requests to the server in just one line of code, allowing for customization of how IP lists are loaded.

Project description

IPGeo-Search

About

IPGeo-Search is a python module which allows for easy use of the IPGeo API. It allows both free and paid users to send requests to the server in just one line of code, allowing for customization of how IP lists are loaded. We offer a 5 day free trial for our API on Our Webpage. To get the free trial API Key, contact our Lab and we will send it to you.

To Install IPGeoSearch, run

pip install IPGeoSearch

Requirements

Before running on your local computer, make sure you have python 3.6+ with the latest version of pandas installed.

To Install Pandas, run:

pip install pandas

Usage

The search function takes in 3 arguments:

ipList: an Array of IP's where each IP is a string.

path: Where the result files are downloaded to.

key: The API Key sent to you.

Example

To use the either version, you must supply your key to the server.

from IPGeoSearch import search

with open('ipList.txt', 'r') as f:
    ip = [line.strip() for line in f]
    f.close()

with open('yourkey.key', 'r') as hashkey:
    key=hashkey.read().replace('\n', '')
    hashkey.close()

search.search(ipList=ip,path='',key=key)

Errors

Common Errors are:

TypeError: "An entry in ipList is not a string at line and cannot be read by the server"
RuntimeError: "Your Key is Invalid. Please purchase a key or start a trial."
RuntimeError: "Your Trial Period has expired. Please purchase a key."
RuntimeError: "Your Key has expired. Please purchase a new key."
RuntimeError: "The Network you are using in unknown and key cannot be secured. Please change networks."
RuntimeError: "Your Key is being used on a different network than it was registered on. Please use your original network or purchase a new key for this network."
ValueError: "IP list was not specified."
ValueError: "Key was not specified."

If you receive an error like:

RuntimeError: "Something went really wrong. Either the IP does not exist in the database, server is down, or another error occured. Check x.x.x.x.json for more details and file an issue if you are unable to solve the problem."

File an issue so our team can assist you.

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

IPGeoSearch-1.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

IPGeoSearch-1.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file IPGeoSearch-1.0.1.tar.gz.

File metadata

  • Download URL: IPGeoSearch-1.0.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for IPGeoSearch-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5bd1976730438bc0a200bc0f2b08d1a60c42e1afeaa5fac9c132778a542c2f3b
MD5 92c4205bf147e2766d613f25bd01e55f
BLAKE2b-256 ab93435608c2e0316d12a7460a97a2df5072ada03c0ee640da7a7bb3cb54d309

See more details on using hashes here.

File details

Details for the file IPGeoSearch-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: IPGeoSearch-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for IPGeoSearch-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77d644ae85ea2d14f2854938f4b090c75b4f9dc50fee495605e07c9b4641696f
MD5 29e694ce3de47e7d36e0bb215d8018fa
BLAKE2b-256 9c50f25eade3710cae710a33d91bc03b1ed52385959ff730a9a6ab48abcbacbc

See more details on using hashes here.

Supported by

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