weboob.capabilities.geolocip

class weboob.capabilities.geolocip.IpLocation(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Represents the location of an IP address.
Variables:
  • city – (unicode) City
  • region – (unicode) Region
  • zipcode – (unicode) Zip code
  • country – (unicode) Country
  • lt – (float) Latitude
  • lg – (float) Longitude
  • osmlink – (unicode) Link to OpenStreetMap location page
  • host – (unicode) Hostname
  • tld – (unicode) Top Level Domain
  • isp – (unicode) Internet Service Provider
class weboob.capabilities.geolocip.CapGeolocIp

Bases: weboob.capabilities.base.Capability

Access information about IP addresses database.

get_location(ipaddr)

Get location of an IP address.

Parameters:ipaddr (str) – IP address
Return type:IpLocation