Files
site_aegisone/py_service/app/config.py
T

26 lines
804 B
Python

import os
from pathlib import Path
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
DATABASE_URL: str = "postgresql+asyncpg://aegisone:aegisone_pass@localhost:5432/aegisone"
SECRET_KEY: str = "change-me-to-random-string"
SESSION_TTL: int = 3600
APP_ENV: str = "development"
LOG_LEVEL: str = "debug"
DOCS_DIR: str = str(Path(__file__).parent.parent / "docs")
PERMISSIONS_DIR: str = str(Path(__file__).parent.parent.parent / "permissions")
UPLOADS_DIR: str = str(Path(__file__).parent.parent.parent / "uploads")
PORTAINER_URL: str = "https://81.177.141.34:9443"
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
@lru_cache()
def get_settings() -> Settings:
return Settings()