mdrs-client-python/mdrsclient/settings.py

21 lines
433 B
Python
Raw Normal View History

2023-05-01 20:00:32 +09:00
import os
from pydantic import BaseSettings
class Settings(BaseSettings):
config_dir_path: str = "~/.mdrs-client"
number_of_process: int = 10
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()
NUMBER_OF_PROCESS = settings.number_of_process
CONFIG_DIR_PATH = os.path.expanduser(settings.config_dir_path)
CONFIG_FILE_PATH = os.path.join(CONFIG_DIR_PATH, "config.ini")