mentat.services.geoip module¶
Implementation of internal geoip2 database library.
Prerequisites¶
This library is dependent on geoip2 (available through PyPI) and requires GeoLite2 Free downloadable databases:
Note
This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com/.
Warning
Work in progress and alpha code.
-
class
mentat.services.geoip.
GeoipService
(asndb=None, citydb=None, countrydb=None)[source]¶ Bases:
object
Implementation of internal geoip2 database service.
-
class
mentat.services.geoip.
GeoipServiceManager
(core_config, updates=None)[source]¶ Bases:
object
Class representing a custom GeoipServiceManager capable of understanding and parsing Mentat system core configurations and enabling easy way of unified bootstrapping of
mentat.services.geoip.GeoipService
service.
-
mentat.services.geoip.
init
(core_config, updates=None)[source]¶ (Re-)Initialize
GeoipServiceManager
instance at module level and store the refence within module.
-
mentat.services.geoip.
manager
()[source]¶ Obtain reference to
GeoipServiceManager
instance stored at module level.
-
mentat.services.geoip.
service
()[source]¶ Obtain reference to
GeoipService
instance from module level manager.