Geolocation Reference

Geolocation

Regardless of the backend you use the response structure will be the same, a Geolocation object that inherits attributes from a dict which means that it can be instantiated with a dictionary only, the attributes are read-only, in case you want to modify some field, you must recreate the object.

You will not normally need to interact directly with this class, since the object is created automatically by the main function, independent from the backend, for this reason no attributes were created private and setters.

class aiogeoip.model.Geolocation({                     query: str, continent: str, continentCode: str, country: str, countryCode: str, region: str, regionName: str, city: str, district: str, zip: str, lat: float, lon: float, timezone: str, isp: str, org: str, as: str, reverse: str, })
location

Is the junction of latitude and longitude: lat, location.

address

Full name of the IP address: continent, country, region_name, city.

ip

Address IPv4 it’s equivalent to query in dict constructor.

continent

It is the same as the “continent” field in the json response

continent_code

It is the same as the “continentCode” field in the json response

country

It is the same as the “country” field in the json response

country_code

It is the same as the “countryCode” field in the json response

region

It is the same as the “region” field in the json response

region_name

It is the same as the “region_name” field in the json response

city

It is the same as the “city” field in the json response

district

It is the same as the “district” field in the json response

zip

It is the same as the “zip” field in the json response

lat

It is the same as the “lat” field in the json response

lon

It is the same as the “lon” field in the json response

timezone

It is the same as the “timezone” field in the json response

isp

It is the same as the “isp” field in the json response

org

It is the same as the “org” field in the json response

reverse

It is the same as the “reverse” field in the json response.