ip_is_v6

privex.helpers.net.ip_is_v6(ip: str)bool[source]

Determines whether an IP address is IPv6 or not

Parameters

ip (str) – An IP address as a string, e.g. 192.168.1.1

Raises

ValueError – When the given IP address ip is invalid

Return bool

True if IPv6, False if not (i.e. probably IPv4)