• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    Python
  • Created over 7 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

IP tracker developed with Python using public APIs

ip_tracker

IP tracker developed with Python using public APIs.

How to run it?

Clone the repo, open a terminal and navigate to the folder where is located the iptracker.py file:

cd path_to_the_directory_where_is_the_iptracker.py_file

Then execute for example:

python iptracker.py 194.69.254.120

This last command will track the given IP and get data about the country of origin, including languages, currency rates, time and estimated distance to Buenos Aires.

For help you can execute:

python iptracker.py -h

How to run it with Docker?

Clone the repo, open a terminal and navigate to the folder where is located the Dockerfile file:

cd path_to_the_directory_where_is_the_dockerfile

Then build the iptracker image:

docker build -t iptracker .

and finally run it:

docker run -it --rm --name running-iptracker iptracker 194.69.254.120

Public APIs used

ip2country for mapping an IP to a country.

REST Countries for retrieving basic information about the country.

Fixer.io for retrieving exchange rates.