Skip to content

GeoIP Legacy Python API (using scikit-build-core)

License

Notifications You must be signed in to change notification settings

ei-grad/geoip-api-python

 
 

Repository files navigation

MaxMind GeoIP Legacy Python Extension API

End of Life

MaxMind will be retiring the GeoIP Legacy databases at the end of May 2022. Until then, this library will only receive critical security and bug fixes. Support for this library will end completely with the last release of the legacy GeoIP databases.

We recommend that you upgrade to our GeoIP2 databases. You can read these from Python using our GeoIP2 Python API.

See our blog post for more information.

Scikit-build-core fork

Setuptools is known for its poor backward compatibility. Some newer versions of setuptools fail to handle the metadata of the GeoIP package during the build process. This is a fork of the original GeoIP package that uses scikit-build-core to build the C extension instead of setuptools.

Requirements

  • Python 2.5+ or 3.3+
  • GeoIP Legacy C Library 1.4.7 or greater

Installation

With pip:

$ pip install GeoIP

From source:

$ python setup.py build
$ python setup.py install

IP Geolocation Usage

IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP database should not be used to identify a particular address or household.

Usage

See the examples in the examples folder.

Troubleshooting

If you get a "libGeoIP.so.1: cannot open shared object No such file or directory" error, add /usr/local/lib to /etc/ld.so.conf then run /sbin/ldconfig /etc/ld.so.conf

License

Copyright (c) 2014 MaxMind LLC

All rights reserved. This package is free software; it is licensed under the LGPL 2.1 or greater.

About

GeoIP Legacy Python API (using scikit-build-core)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 84.8%
  • Python 14.5%
  • CMake 0.7%