devops.enums

Top level package for enums in mstd checks.

class devops.enums.LogLevel(*values)[source]

Bases: StrEnum

Enumeration of logging levels.

NONE = 'NONE'
DEBUG = 'DEBUG'
INFO = 'INFO'
WARNING = 'WARNING'
ERROR = 'ERROR'
CRITICAL = 'CRITICAL'
classmethod from_int(level)[source]

Create LogLevel from an integer logging level.

Parameters:

level (int) – The integer logging level.

Returns:

LogLevel – The corresponding LogLevel enumeration member.

Return type:

LogLevel

to_logging_level()[source]

Convert LogLevel to corresponding logging module level.

Returns:

int – The logging module level.

Return type:

int

classmethod from_logging_level(level)[source]

Create LogLevel from an integer logging level.

Parameters:

level (int) – The integer logging level.

Returns:

LogLevel – The corresponding LogLevel enumeration member.

Return type:

LogLevel

class devops.enums.StrEnum(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Base class for string enumerations.

classmethod is_valid(value)[source]

Check if a given string is a valid enumeration member.

Parameters:

value (str) – The string to check.

Returns:

bool – True if the string corresponds to a valid enumeration member, False otherwise.

Return type:

bool

classmethod list_values()[source]

List all enumeration values as strings.

Returns:

list[str] – A list of all enumeration values.

Return type:

list[str]

Modules

base

Base enumerations for mstd checks.

logging

Module defining logging level enumeration.