utils¶
Utilities for the application.
General utility functions.
- byte_bot.utils.camel_case(string: str) str[source]¶
 Convert a string to camel case.
- Parameters:
 string – The string to convert.
- Returns:
 The camel cased string.
- byte_bot.utils.case_insensitive_string_compare(a: str, b: str, /) bool[source]¶
 Compare two strings case insensitively.
- Parameters:
 a – The first string.
b – The second string.
- Returns:
 Whether the strings are equal.
- byte_bot.utils.dataclass_as_dict_shallow(dataclass: Any, *, exclude_none: bool = False) dict[str, Any][source]¶
 Convert a dataclass to a dict.
- Parameters:
 dataclass – The dataclass to convert.
exclude_none – Whether to exclude None values.
- Returns:
 The dataclass as a dict.