ipaddress module provides types for IP addresses. It is a subset of CPython’s ipaddress
Available on these boards
- ipaddress.ip_address(obj: int | str) IPv4Address ¶
Return a corresponding IP address object or raise ValueError if not possible.
- class ipaddress.IPv4Address(address: int | str | bytes)¶
Encapsulates an IPv4 address.
Create a new IPv4Address object encapsulating the address value.
The value itself can either be bytes or a string formatted address.
- __eq__(other: object) bool ¶
Two Address objects are equal if their addresses and address types are equal.