MCPcopy
hub / github.com/flet-dev/flet / get_bool_env_var

Function get_bool_env_var

sdk/python/packages/flet/src/flet/utils/platform_utils.py:8–20  ·  view source on GitHub ↗

Parses an environment variable value as a boolean. Args: name: Environment variable name. Returns: `True` when the variable value is `true`, `1`, or `yes` (case-insensitive); `False` for any other defined value; `None` when the variable is not set.

(name: str)

Source from the content-addressed store, hash-verified

6
7
8def get_bool_env_var(name: str):
9 """
10 Parses an environment variable value as a boolean.
11
12 Args:
13 name: Environment variable name.
14
15 Returns:
16 `True` when the variable value is `true`, `1`, or `yes` (case-insensitive);
17 `False` for any other defined value; `None` when the variable is not set.
18 """
19 v = os.getenv(name)
20 return v.lower() in ["true", "1", "yes"] if v is not None else None
21
22
23def is_asyncio():

Callers 5

__init__Method · 0.90
flutter_base.pyFile · 0.90
__init__Method · 0.90
run_asyncFunction · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by 1

__init__Method · 0.72