Functions | |
| bool | is_host_valid (str host) |
| bool | is_invalid (IPv4Address|IPv6Address address) |
| bool | is_ip_address (str address) |
| bool | is_ipv4_address (str address) |
| bool | is_ipv6_address (str address) |
| bool | is_link_local (IPv4Address|IPv6Address address) |
| bool | is_local (IPv4Address|IPv6Address address) |
| bool | is_loopback (IPv4Address|IPv6Address address) |
| bool | is_private (IPv4Address|IPv6Address address) |
| str | normalize_url (str address) |
Variables | |
| IPV6_IPV4_LOOPBACK = ip_network("::ffff:127.0.0.0/104") | |
| tuple | LINK_LOCAL_NETWORKS |
| tuple | LOOPBACK_NETWORKS |
| tuple | PRIVATE_NETWORKS |
Network utilities.
| bool homeassistant.util.network.is_host_valid | ( | str | host | ) |
Check if a given string is an IP address or valid hostname.
Definition at line 93 of file network.py.
| bool homeassistant.util.network.is_invalid | ( | IPv4Address | IPv6Address | address | ) |
Check if an address is invalid.
Definition at line 58 of file network.py.
| bool homeassistant.util.network.is_ip_address | ( | str | address | ) |
Check if a given string is an IP address.
Definition at line 63 of file network.py.
| bool homeassistant.util.network.is_ipv4_address | ( | str | address | ) |
Check if a given string is an IPv4 address.
Definition at line 73 of file network.py.
| bool homeassistant.util.network.is_ipv6_address | ( | str | address | ) |
Check if a given string is an IPv6 address.
Definition at line 83 of file network.py.
| bool homeassistant.util.network.is_link_local | ( | IPv4Address | IPv6Address | address | ) |
Check if an address is link-local (local but not necessarily unique).
Definition at line 48 of file network.py.
| bool homeassistant.util.network.is_local | ( | IPv4Address | IPv6Address | address | ) |
Check if an address is on a local network.
Definition at line 53 of file network.py.
| bool homeassistant.util.network.is_loopback | ( | IPv4Address | IPv6Address | address | ) |
Check if an address is a loopback address.
Definition at line 38 of file network.py.
| bool homeassistant.util.network.is_private | ( | IPv4Address | IPv6Address | address | ) |
Check if an address is a unique local non-loopback address.
Definition at line 43 of file network.py.
| str homeassistant.util.network.normalize_url | ( | str | address | ) |
Normalize a given URL.
Definition at line 107 of file network.py.
| homeassistant.util.network.IPV6_IPV4_LOOPBACK = ip_network("::ffff:127.0.0.0/104") |
Definition at line 11 of file network.py.
| tuple homeassistant.util.network.LINK_LOCAL_NETWORKS |
Definition at line 31 of file network.py.
| tuple homeassistant.util.network.LOOPBACK_NETWORKS |
Definition at line 13 of file network.py.
| tuple homeassistant.util.network.PRIVATE_NETWORKS |
Definition at line 20 of file network.py.