23 lines
655 B
Python
23 lines
655 B
Python
import os
|
|
from pydantic import BaseModel
|
|
from dotenv import load_dotenv
|
|
|
|
|
|
load_dotenv()
|
|
|
|
|
|
class Settings(BaseModel):
|
|
eip_base_url: str = os.getenv("EIP_BASE_URL", "https://smart.jdbox.xyz:58001")
|
|
eip_username: str = os.getenv("EIP_USERNAME", "")
|
|
eip_password: str = os.getenv("EIP_PASSWORD", "")
|
|
eip_gateway_mac: str = os.getenv("EIP_GATEWAY_MAC", "")
|
|
eip_default_cityhash: str = os.getenv("EIP_DEFAULT_CITYHASH", "")
|
|
eip_default_num: int = int(os.getenv("EIP_DEFAULT_NUM", "10"))
|
|
redis_url: str = os.getenv("REDIS_URL", "redis://localhost:6379/0")
|
|
log_level: str = os.getenv("LOG_LEVEL", "INFO")
|
|
|
|
|
|
settings = Settings()
|
|
|
|
|