Initial commit - cleaned repository
This commit is contained in:
30
backup-services/google-search/backend/app/config.py
Normal file
30
backup-services/google-search/backend/app/config.py
Normal file
@ -0,0 +1,30 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
from typing import Optional
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# Google Custom Search API 설정
|
||||
google_api_key: Optional[str] = None
|
||||
google_search_engine_id: Optional[str] = None
|
||||
|
||||
# SerpAPI 설정 (대안)
|
||||
serpapi_key: Optional[str] = None
|
||||
|
||||
# Redis 캐싱 설정
|
||||
redis_host: str = "redis"
|
||||
redis_port: int = 6379
|
||||
redis_db: int = 2
|
||||
cache_ttl: int = 3600 # 1시간
|
||||
|
||||
# 검색 설정
|
||||
max_results: int = 10
|
||||
default_language: str = "ko"
|
||||
default_country: str = "kr"
|
||||
|
||||
# 서비스 설정
|
||||
service_name: str = "Google Search Service"
|
||||
debug: bool = True
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user