Spaces:
Sleeping
Sleeping
File size: 792 Bytes
66fef64 0236fb6 66fef64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
"""
Settings and environment configuration
"""
import os
from functools import lru_cache
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""Application settings"""
# OpenAI API key for embeddings
openai_api_key: str
# TMDB API key for movie data
tmdb_api_key: str
# API authentication token
api_token: str
# Environment (dev/prod)
env: str = "dev"
# Logging level
log_level: str = "INFO"
# Filter adult content (True = exclude adult films, False = include all)
filter_adult_content: bool = True
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
@lru_cache()
def get_settings() -> Settings:
"""Get cached settings instance"""
return Settings() |