geolocate.classes.geowrapper module¶
geolocate wrapper to Geolite2 API.
Programmed by: Dante Signal31
email: dante.signal31@gmail.com
-
exception
geolocate.classes.geowrapper.
CompressedFileNotFound
(compressed_database_path)[source]¶ Bases:
OSError
Raised when no .gz compressed file is found in temporary folder where downloaded data is placed.
-
exception
geolocate.classes.geowrapper.
GeoIP2WebServiceNotConfigured
[source]¶ Bases:
Exception
GeoIP2 WebService access is still not configured.
-
class
geolocate.classes.geowrapper.
GeoIPDatabase
(configuration)[source]¶ Bases:
object
Location engines may have multiple query methods. This class encapsulates them all in _locators list.
-
__init__
(configuration)[source]¶ Parameters: configuration (config.Configuration) – Geolocate configuration.
-
geoip2_local
¶
-
geoip2_webservice
¶ Returns: GeoIPLocateor to query GeoIP webservice. Return type: WebServiceGeoLocator Raises: GeoIP2WebServiceNotConfigured
-
-
exception
geolocate.classes.geowrapper.
InvalidLocalDatabase
(local_database_path)[source]¶ Bases:
Exception
Local database exists but is corrupted.
-
class
geolocate.classes.geowrapper.
LocalDatabaseGeoLocator
(configuration)[source]¶ Bases:
geolocate.classes.geowrapper.GeoLocator
-
__init__
(configuration)[source]¶ Parameters: configuration (config.Configuration) – Geolocate configuration. Returns: none Raise: LocalDatabaseNotFound Raise: InvalidLocalDatabase
-
-
exception
geolocate.classes.geowrapper.
LocalDatabaseNotFound
(local_database_path)[source]¶ Bases:
OSError
Local database file is missing.
-
exception
geolocate.classes.geowrapper.
NotValidDatabaseFileFound
(decompressed_database_path)[source]¶ Bases:
OSError
Raised when a new database pack is downloaded on local, but after decompression no valid database file is found in decompressed folder.
-
class
geolocate.classes.geowrapper.
WebServiceGeoLocator
(configuration)[source]¶ Bases:
geolocate.classes.geowrapper.GeoLocator
-
__init__
(configuration)[source]¶ Parameters: configuration (config.Configuration) – Geolocate configuration. Returns: None
-