nadzoring.network_base.geolocation_ip module¶
- nadzoring.network_base.geolocation_ip.geo_ip(ip: str) dict[str, str][source]¶
A function for getting coordinates based on an external IP address.
Performs a request to the service, which transmits the address. In response, it receives JSON with coordinates and more (the rest of the data is not returned from the function). However, if necessary, it can be expanded.
- Parameters:
ip (str) – ip address
- Returns:
dict with lat and lon or None
- Return type:
dict[str, str] | None