ip_is_v4

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

Determines whether an IP address is IPv4 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)