📦 Initialize Geulbeot structure and merge Prompts & test projects
This commit is contained in:
17
03. Code/geulbeot_3rd/api_config.py
Normal file
17
03. Code/geulbeot_3rd/api_config.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""API 키 관리 - api_keys.json에서 읽기"""
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
def load_api_keys():
|
||||
"""프로젝트 폴더의 api_keys.json에서 API 키 로딩"""
|
||||
search_path = Path(__file__).resolve().parent
|
||||
for _ in range(5):
|
||||
key_file = search_path / 'api_keys.json'
|
||||
if key_file.exists():
|
||||
with open(key_file, 'r', encoding='utf-8') as f:
|
||||
return json.load(f)
|
||||
search_path = search_path.parent
|
||||
print("warning: api_keys.json not found")
|
||||
return {}
|
||||
|
||||
API_KEYS = load_api_keys()
|
||||
Reference in New Issue
Block a user