first commit
This commit is contained in:
20
mdrsclient/settings.py
Normal file
20
mdrsclient/settings.py
Normal file
@ -0,0 +1,20 @@
|
||||
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")
|
Reference in New Issue
Block a user