Function - is_fqdn

Contents

Function - is_fqdn#

openfl.utilities.utils.is_fqdn(hostname)[source]#

Check if a hostname is a fully qualified domain name.

This function checks if a hostname is a fully qualified domain name (FQDN) according to the rules specified on Wikipedia. https://en.m.wikipedia.org/wiki/Fully_qualified_domain_name.

Parameters:

hostname (str) – The hostname to check.

Returns:

True if the hostname is a FQDN, False otherwise.

Return type:

bool