jacinle.utils.env#
Functions
Return if the |
|
|
Get the environment variable with the given name. |
|
Return if the debug mode is enabled. |
|
Return if the verbose mode is enabled. |
Functions
- jac_getenv(name, default=None, type=None, prefix=None)[source]#
Get the environment variable with the given name.
- Parameters:
name (str) – the name of the environment variable.
default (Any) – the default value if the environment variable is not set.
type (str | type | None) – the type of the environment variable. If not given, the type of the default value will be used. It supports a special type, denoted by a string
'bool'
, indicating that the value will be converted to a boolean value (‘true’/’false’, ‘yes’/’no’, ‘1’/’0’).prefix (str) – the prefix of the environment variable. If not given, the prefix will be
JAC_
.
- Returns:
the value of the environment variable.
- Return type: