mdrs-client-python/mdrsclient/settings.py

19 lines
363 B
Python
Raw Normal View History

2023-05-01 20:00:32 +09:00
import os
from pydantic import BaseSettings
class Settings(BaseSettings):
2023-05-10 14:46:08 +09:00
config_dirname: str = "~/.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()
2023-05-10 14:46:08 +09:00
CONCURRENT = settings.concurrent
2023-05-10 18:17:35 +09:00
CONFIG_DIRNAME = os.path.realpath(os.path.expanduser(settings.config_dirname))