Utilities for handling DNS hostnames
tlslite.utils.dns_utils.
is_valid_hostname
Check if the parameter is a valid hostname.
hostname (str or bytearray) – string to check
boolean