Skip to content

Miscellaneous Modules

degirum.log.DGLog

Console logging class with programmable verbosity.

degirum.log.DGLog.print(message) staticmethod

Print message to log according to current verbosity level.

Parameters:

Name Type Description Default
message str

Message string to print.

required

degirum.log.DGLog.set_verbose_state(state) staticmethod

Set log verbosity state.

Parameters:

Name Type Description Default
state bool

If True, then log prints messages to console, otherwise no messages printed.

required

degirum.log.log_wrap(f=None, *, log_level=logging.DEBUG)

Decorator to log function entry and exit.

Parameters:

Name Type Description Default
f Callable

Function to log.

None
log_level int

Logging level of the log entries.

DEBUG

degirum.exceptions.DegirumException

Bases: Exception

Base type for all DeGirum exceptions.

degirum.exceptions.validate_color_tuple(color)

Validate if color has acceptable representation.

Parameters:

Name Type Description Default
color Any

Color object to validate.

required

Raises:

Type Description
DegirumException

if color is not a three-element tuple and each element is integer number.

Returns:

Type Description
tuple

color sequence converted to tuple.