myops/config/config.py
2021-06-21 17:38:32 +08:00

16 lines
450 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') # 邮箱密码
settings = Settings()