abstract_api.ip_geolocation.ip_geolocation module#

class abstract_api.ip_geolocation.ip_geolocation.IPGeolocation(*, response_fields: Iterable[str] | None = None, **kwargs)[source]#

Bases: ResponseFieldsMixin, BaseService[IPGeolocationResponse]

AbstractAPI IP geolocation service.

Used to determine the location and other details of IP addresses.

Attributes:

_subdomain: IP Geolocation service subdomain. _response_fields: Selected response fields to be returned from IP

Geolocation service endpoint.

check(ip: str, fields: Iterable[str] | None = None) IPGeolocationResponse[source]#

Analyzes an IP address for geographical data.

Args:

ip: A valid IP address to analyze. fields: Selected response fields (optional).

Returns:

IPGeolocationResponse representing API call response.