Whats My Ip

class prsw.stat.whats_my_ip.WhatsMyIp(RIPEstat)

This data call returns the IP address of the requestor.

Reference: https://stat.ripe.net/docs/data_api#whats-my-ip

Property

Description

ip

The IP address of the requestor

import prsw

ripe = prsw.RIPEstat()
response = ripe.whats_my_ip()

print(response)
# '1.1.1.1'

response.ip
# IPv4Address('1.1.1.1')
# -- or depending:
# IPv6Address('f17d:36e:9d3b:4b39:b3c4:44a:b2b1:45e1')
__init__(RIPEstat) None

Initialize and request Whats My Ip.

property ip

Return the IP address as an ipaddress object.