Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheSmallHanCat/flow2api
/ _is_truthy_env
Function
_is_truthy_env
src/services/browser_captcha.py:57–60 ·
view source on GitHub ↗
判断环境变量是否为 true。
(name: str)
Source
from the content-addressed store, hash-verified
55
56
57
def
_is_truthy_env(name: str) -> bool:
58
""
"判断环境变量是否为 true。"
""
59
value = os.environ.get(name,
""
)
60
return
value.strip().lower() in {
"1"
,
"true"
,
"yes"
,
"on"
}
61
62
63
ALLOW_DOCKER_HEADED = (
Callers
1
browser_captcha.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected