New apps Added

This commit is contained in:
2026-07-08 10:43:39 -04:00
parent 3b1f4bbd75
commit fefc2c8b5c
1114 changed files with 406637 additions and 154 deletions
@@ -0,0 +1,24 @@
"""Configuration helper utilities."""
from __future__ import annotations
from typing import Any
def as_bool(value: Any, default: bool = False) -> bool:
"""Normalize truthy/falsy values to a strict boolean.
Important for stringified options (e.g. "False" should yield False).
"""
if isinstance(value, bool):
return value
if isinstance(value, str):
lowered = value.strip().lower()
if lowered in {"true", "1", "yes", "on"}:
return True
if lowered in {"false", "0", "no", "off"}:
return False
return default
if isinstance(value, (int, float)):
return bool(value)
return default