first push

This commit is contained in:
√(noham)²
2025-02-17 01:02:43 +01:00
parent 334683af6c
commit 49375f3dd1
11 changed files with 624 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
import json
from typing import Dict
from pathlib import Path
def load_config(file_path: str | Path) -> Dict:
"""Load configuration from a JSON file
Expected format:
{
"token": "your_token",
"provider": "provider_name"
}
"""
path = Path(file_path)
if not path.exists():
raise FileNotFoundError(f"Config file not found: {file_path}")
with open(path, 'r') as f:
return json.load(f)