30 lines
849 B
Python
30 lines
849 B
Python
from pathlib import Path
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
REPO_ROOT = Path(__file__).resolve().parents[4]
|
|
DEFAULT_UPLOAD_ROOT = REPO_ROOT / "uploads"
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
app_name: str = "secretary-api"
|
|
app_env: str = "local"
|
|
app_host: str = "0.0.0.0"
|
|
app_port: int = 8010
|
|
database_url: str = "mysql+pymysql://baron_support:baron_support@127.0.0.1:13308/baron_support"
|
|
abc_api_base_url: str = "http://localhost:4000"
|
|
abc_api_key: str = ""
|
|
abc_project_id: int = 1
|
|
abc_channel_id: int = 1
|
|
upload_root_dir: str = str(DEFAULT_UPLOAD_ROOT)
|
|
upload_max_file_size_mb: int = 30
|
|
sso_issuer: str = ""
|
|
sso_client_id: str = ""
|
|
sso_client_secret: str = ""
|
|
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
|
|
|
|
settings = Settings()
|