SiteGloopUtils module

Various utilities for use by SiteGloop.

class SiteGloopUtils.SiteGloopLogger(verbosity=50, spinner=None)

Bases: object

Logger for SiteGloop.

Parameters
  • verbosity (str, optional) – Human readable string describing the log level to use

  • spinner (obj, optional) – Object containing the progress spinner to use

verbosity

Human readable string describing the log level to use

Type

str

spinner

Object containing the progress spinner to use

Type

obj

logit(level=None, msg=None, spin=False)

Log message or iterate the spinner.

Parameters
  • level (str, optional) – log level to use, by default None (choices: debug, info, warning, error, critical)

  • msg (str, optional) – message to log, by default None

  • spin (bool, optional) – True to spin the spinner, by default False

Returns

True if successful

Return type

bool

SiteGloopUtils.is_fqdn(hostname: str) → bool

Check for a valid hostname.

Parameters

hostname (str) – hostname to validate

Returns

True if it’s a valid hostname

Return type

bool