color
color
blue(var, loud=True, logger=None)
Print the given variable in blue color using colorama and return the colored string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
var |
Any
|
The variable to be printed in red color. |
required |
loud |
bool
|
If True, print the colored output to the console. Defaults to True. |
True
|
logger |
Optional[Logger]
|
The logger to be used for logging. If provided, the colored output will be logged using this logger. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The input variable formatted as a red-colored string. |
Source code in alana/color.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
cyan(var, loud=True, logger=None)
Print var in cyan, like alana.blue
Source code in alana/color.py
59 60 61 62 63 |
|
green(var, loud=True, logger=None)
Print var in green, like alana.blue
Source code in alana/color.py
30 31 32 33 34 |
|
log(loud, output, logger=None)
Log the output based on the provided parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
loud |
bool
|
If True, print the output to the console. |
required |
output |
str
|
The string to be logged. |
required |
logger |
Optional[Logger]
|
The logger to be used for logging. If provided, the output will be logged using this logger. Defaults to None. |
None
|
Source code in alana/color.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
pink(var, loud=True, logger=None)
Print var in pink, like alana.blue
Source code in alana/color.py
65 66 67 68 69 |
|
red(var, loud=True, logger=None)
Print var in red, like alana.blue
Source code in alana/color.py
24 25 26 27 28 |
|
yellow(var, loud=True, logger=None)
Print var in yellow, like alana.blue
Source code in alana/color.py
53 54 55 56 57 |
|