python_hosts.utils module¶
This module contains utility functions used by the Hosts and HostsEntry methods
-
python_hosts.utils.
dedupe_list
(seq)[source]¶ Utility function to remove duplicates from a list :param seq: The sequence (list) to deduplicate :return: A list with original duplicates removed
-
python_hosts.utils.
is_ipv4
(entry)[source]¶ Check if the string provided is a valid ipv4 address :param entry: A string representation of an IP address :return: True if valid, False if invalid
-
python_hosts.utils.
is_ipv6
(entry)[source]¶ Check if the string provided is a valid ipv6 address :param entry: A string representation of an IP address :return: True if valid, False if invalid