March 2019
Beginner
490 pages
12h 40m
English
There is a third-party library called python-geoip, which has a robust interface to answer your IP location query.
You can find more information about this package on the developer's website: http://pythonhosted.org/python-geoip. You can install the package directly from the Python repository.
If you are working with Python 3, you need to install python-geoip-python3 (https://pypi.org/project/python-geoip-python3). This is a fork of python-geoip with Python 3 support. We also need to install the geolite2 module with the pip install python-geoip-geolite2 command:
pip install python-geoip-python3
In the following script, we can see an example of how to use the python-geoip package. You can find the following code ...
Read now
Unlock full access