api 의존성 추가 및 DB 설정 변경
This commit is contained in:
1 parent
f008ed4010
commit
ab4dc6fb81
5 files changed
+37
-4
No files matched your search
+14
-1
@@ -1,3 +1,5 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
@@ -10,9 +12,20 @@ class Settings(BaseSettings):
|
||||
suno_callback_url: str = "" # Suno가 요구하는 값. 결과는 폴링으로 받는다
|
||||
higgsfield_account: str = "" # CLI 토큰이 이 계정 것인지 확인만 한다
|
||||
|
||||
mysql_url: str = "" # mysql+asyncmy://user:pw@host:3306/db
|
||||
mysql_host: str = ""
|
||||
mysql_port: int = 3306
|
||||
mysql_user: str = ""
|
||||
mysql_password: str = ""
|
||||
mysql_db: str = ""
|
||||
|
||||
azure_blob_base_url: str = ""
|
||||
azure_blob_sas_token: str = ""
|
||||
|
||||
@property
|
||||
def mysql_url(self) -> str:
|
||||
password = quote_plus(self.mysql_password)
|
||||
return (f"mysql+asyncmy://{self.mysql_user}:{password}"
|
||||
f"@{self.mysql_host}:{self.mysql_port}/{self.mysql_db}")
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in new issue
Block a user