MCPcopy Create free account
hub / github.com/VitoHowe/glm-coding / Settings

Class Settings

app/config.py:17–51  ·  view source on GitHub ↗

Environment-backed runtime settings.

Source from the content-addressed store, hash-verified

15
16@dataclass(frozen=True)
17class Settings:
18 """Environment-backed runtime settings."""
19
20 app_host: str
21 app_port: int
22 data_dir: Path
23 runtime_logs_dir: Path
24 accounts_path: Path
25 tasks_path: Path
26 sessions_dir: Path
27 bigmodel_api_base: str
28 bigmodel_origin: str
29 bigmodel_referer: str
30 browser_impersonate: str
31 request_timeout_seconds: float
32 default_language: str
33 tencent_captcha_domain: str
34 tencent_captcha_aid: str
35 tencent_captcha_entry_url: str
36 tencent_captcha_max_retries: int
37 tencent_captcha_min_confidence: float
38 tencent_captcha_node: str
39 tencent_ocr_enabled: bool
40 tencent_ocr_include_debug: bool
41 tencent_ocr_workers: int
42 tencent_ocr_timeout_seconds: int
43 runtime_log_level: str
44 runtime_log_retention_days: int
45
46
47@lru_cache(maxsize=1)
48def get_settings() -> Settings:
49 """Load and cache project settings."""
50 data_dir = _resolve_path(os.getenv("DATA_DIR", "data"))
51 sessions_dir = data_dir / "sessions"
52 runtime_logs_dir = data_dir / "logs" / "runtime"
53 data_dir.mkdir(parents=True, exist_ok=True)
54 sessions_dir.mkdir(parents=True, exist_ok=True)

Callers 1

get_settingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected