mdrs-client-python/mdrsclient/settings.py

19 lines
420 B
Python
Raw Permalink Normal View History

2023-05-01 20:00:32 +09:00
import os
2023-07-19 12:52:40 +09:00
from pydantic_settings import BaseSettings
2023-05-01 20:00:32 +09:00
class Settings(BaseSettings):
mdrs_client_config_dirname: str = "~/.mdrs-client"
mdrs_client_concurrent: int = 10
2023-05-01 20:00:32 +09:00
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()
CONCURRENT = settings.mdrs_client_concurrent
CONFIG_DIRNAME = os.path.realpath(os.path.expanduser(settings.mdrs_client_config_dirname))