20 lines
447 B
Python
20 lines
447 B
Python
from pydantic_settings import BaseSettings
|
|
from functools import lru_cache
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
mongodb_uri: str = "mongodb://localhost:27017"
|
|
mongodb_db_name: str = "grateful_journal"
|
|
api_port: int = 8001
|
|
environment: str = "development"
|
|
frontend_url: str = "http://localhost:8000"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = False
|
|
|
|
|
|
@lru_cache()
|
|
def get_settings():
|
|
return Settings()
|