BT.envs

BT.envs

BT.envs

Function

returns the currently valid environment variable object.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
None-NoNoneNo parameters required.

Return Value

TypeDescription
ObjectReturns the dynamic key-value object that combines OS environment variables and BT runtime overlay. See below for field rules.

Return object field

BT.envs() returns a dynamic object, not a fixed structure object. Object fields come from current OS environment variables and BT runtime overlay.

FieldTypeMust existDescription
Any environment variable nameStringNoA valid environment variable value. The field name is the environment variable name, such as PATH, BT_MODE. When the variable does not exist or is obscured by BT.remove_env(name), this field does not exist and the read result is empty.

Examples

Notes

- BT.envs() will traverse OS environment variables as needed, which may result in more string allocations.

- Variables that have been obscured by the remove_env removal flag will not appear in the returned object.

  • The overlay written by BT.set_env(name, value) will overwrite the OS environment variable with the same name.