amo-server/utils/config.py

32 lines
756 B
Python

from pydantic_settings import BaseSettings
# Removed unused import
class Settings(BaseSettings):
# Database
DATABASE_URL: str = "sqlite:///./amo_data.db"
# AMO CRM API
AMO_CRM_DOMAIN: str = "wecheap.amocrm.ru"
AMO_CRM_ACCESS_TOKEN: str = "" # Make it optional with default empty string
# Google Sheets API
GOOGLE_SERVICE_ACCOUNT_FILE: str = "" # Make it optional
GOOGLE_SCOPES: str = "https://www.googleapis.com/auth/spreadsheets"
# Redis (for FastStream message broker)
REDIS_URL: str = "redis://localhost:6379/0"
# API Settings
API_V1_STR: str = "/api/v1"
# Logging
LOG_LEVEL: str = "INFO"
class Config:
env_file = ".env"
case_sensitive = True
settings = Settings()