Skip to main content

CachedDnsName

This class provides a mechanism for retrieving and caching the fully qualified domain name (FQDN) of the local host. It ensures the FQDN is formatted using punycode and stores the result internally to optimize subsequent lookups. The class also implements a string representation that returns the cached domain name directly.

Attributes

AttributeTypeDescription
_fqdnstringStores the punycode-encoded fully qualified domain name to cache the result of the DNS lookup.

Methods


get_fqdn()

@classmethod
def get_fqdn() - > string

Fetches and caches the punycode-encoded fully qualified domain name of the local host.

Returns

TypeDescription
stringThe cached fully qualified domain name, converted to punycode format.