class GeoIP2:
Undocumented
Class Method | open |
Undocumented |
Constant | MODE_AUTO |
Undocumented |
Constant | MODE_FILE |
Undocumented |
Constant | MODE_MEMORY |
Undocumented |
Constant | MODE_MMAP |
Undocumented |
Constant | MODE_MMAP_EXT |
Undocumented |
Method | __del__ |
Undocumented |
Method | __init__ |
Initialize the GeoIP object. No parameters are required to use default settings. Keyword arguments may be passed in to customize the locations of the GeoIP datasets. |
Method | __repr__ |
Undocumented |
Method | _check_query |
Check the query and database availability. |
Method | city |
Return a dictionary of city information for the given IP address or Fully Qualified Domain Name (FQDN). Some information in the dictionary may be undefined (None). |
Method | coords |
Undocumented |
Method | country |
Return a dictionary with the country code and name when given an IP address or a Fully Qualified Domain Name (FQDN). For example, both '24.124.1.80' and 'djangoproject.com' are valid parameters. |
Method | country_code |
Return the country code for the given IP Address or FQDN. |
Method | country_name |
Return the country name for the given IP Address or FQDN. |
Method | geos |
Return a GEOS Point object for the given query. |
Method | lat_lon |
Return a tuple of the (latitude, longitude) for the given query. |
Method | lon_lat |
Return a tuple of the (longitude, latitude) for the given query. |
Class Variable | cache_options |
Undocumented |
Instance Variable | _cache |
Undocumented |
Instance Variable | _city |
Undocumented |
Instance Variable | _city_file |
Undocumented |
Instance Variable | _country |
Undocumented |
Instance Variable | _country_file |
Undocumented |
Property | _country_or_city |
Undocumented |
Property | _reader |
Undocumented |
Property | info |
Return information about the GeoIP library and databases in use. |
Initialize the GeoIP object. No parameters are required to use default settings. Keyword arguments may be passed in to customize the locations of the GeoIP datasets.
GeoIPOptions
C API settings, respectively. Defaults to 0,
meaning MODE_AUTO.