Work in progress!
Initialize the class.
@param filename: Path to a geoip database. @type filename: str @param flags: Flags that affect how the database is processed. Currently supported flags are STANDARD (the default), MEMORY_CACHE (preload the whole file into memory) and MMAP_CACHE (access the file via mmap). @type flags: int @param cache: Used in tests to skip instance caching @type cache: bool
Returns 2-letter country code (e.g. ‘US’) for specified IP address. Use this method if you have a Country, Region, or City database.
@param addr: IP address @type addr: str @return: 2-letter country code @rtype: str
Returns 2-letter country code (e.g. ‘US’) for specified hostname. Use this method if you have a Country, Region, or City database.
@param hostname: Hostname @type hostname: str @return: 2-letter country code @rtype: str