17 lines
475 B
Python
17 lines
475 B
Python
from pydantic import BaseConfig
|
|
from typing import Optional
|
|
import os
|
|
|
|
|
|
class Settings(BaseConfig):
|
|
redis_host: str = "192.168.100.30" # reids 服务器IP
|
|
redis_port: int = 6379 # redis 端口
|
|
redis_db: int = 2 # redis db
|
|
mail_server: str = "smtp.exmail.qq.com" # 邮箱server
|
|
mail_user: str = "ops@kingsome.cn" # 邮箱用户名
|
|
mail_pswd: Optional[str] = os.getenv('mail_pswd') # 邮箱密码
|
|
x_token: str = "abc"
|
|
|
|
|
|
settings = Settings()
|