IP

class TH.IP(ip: str)

Bases: Generic[TH.Core.THCollection.T]

Class representing an IP address

get_geolocation()pandas.core.frame.DataFrame

Returns IP geolocation data

Returns

Dataframe with geolocation data

Following columns are provided within the returned dataframe:

  • IpAddr: The requested IP address

  • Type: Tipe of address (Public/Private)

  • City: The city name (when available)

  • Country: The country name

  • CC: The country code

  • Lat: Lattitude out of the IP geolocation

  • Lon: Longitude out of the IP geolocation

is_private()bool
Returns

True if IP is private, False if public

is_public()bool
Returns

True if IP is public, False if private