Files
Mark-LIV/config/__init__.py
T
2026-04-19 15:22:49 +03:00

17 lines
534 B
Python

# config/__init__.py
import json, os
from pathlib import Path
_CONFIG_PATH = Path(__file__).parent / "api_keys.json"
def get_config() -> dict:
with open(_CONFIG_PATH, "r", encoding="utf-8") as f:
return json.load(f)
def get_os() -> str:
"""Returns: 'windows' | 'mac' | 'linux'"""
return get_config().get("os_system", "windows").lower()
def is_windows() -> bool: return get_os() == "windows"
def is_mac() -> bool: return get_os() == "mac"
def is_linux() -> bool: return get_os() == "linux"