32 lines
711 B
Python
32 lines
711 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
DATABASE_URL: str
|
|
DATABASE_URL_SYNC: str
|
|
REDIS_URL: str = "redis://localhost:6379/0"
|
|
SECRET_KEY: str
|
|
ACCESS_TOKEN_EXPIRE_MINUTES: int = 43200
|
|
REFRESH_TOKEN_EXPIRE_DAYS: int = 60
|
|
|
|
STORAGE_BACKEND: str = "local"
|
|
LOCAL_STORAGE_PATH: str = "./uploads"
|
|
S3_ENDPOINT: str = ""
|
|
S3_ACCESS_KEY: str = ""
|
|
S3_SECRET_KEY: str = ""
|
|
S3_BUCKET: str = "ciyuan-viewfinder"
|
|
S3_REGION: str = ""
|
|
S3_PUBLIC_URL: str = ""
|
|
|
|
TENCENT_MAP_KEY: str = ""
|
|
|
|
SENTRY_DSN: str = ""
|
|
LOG_JSON: bool = False
|
|
LOG_LEVEL: str = "INFO"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
|
|
settings = Settings()
|