Geolocation with geoip
class GeoIP([path=None, cache=, country=None, city=None])[source]
The GeoIP object doesn’t need any parameters to make use of the default settings. However, at the minimum the GEOIP_PATH setting ought to be set using the road to the place of the GeoIP data sets. The following initialization keywords enables you to personalize the defaults.
|path||Base directory where GeoIP information is located or even the full road to in which the city or country documents (.dat) can be found. Assumes that both city and country data sets come in ezinearticles overrides the GEOIP_PATH settings attribute.|
|cache||The cache settings when opening the GeoIP datasets, and could be an integer in (, 1, 2, 4) akin to the GEOIP_STANDARD, GEOIP_MEMORY_CACHE, GEOIP_CHECK_CACHE, and GEOIP_INDEX_CACHE GeoIPOptions C API settings, correspondingly. Defaults to (GEOIP_STANDARD).|
|country||The specific GeoIP country computer file. Defaults to GeoIP.dat. Setting this keyword overrides the GEOIP_COUNTRY settings attribute.|
|city||The specific GeoIP city computer file. Defaults to GeoLiteCity.dat. Setting this keyword overrides the GEOIP_CITY settings attribute.|