diff options
Diffstat (limited to 'girok/config.py')
-rw-r--r-- | girok/config.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/girok/config.py b/girok/config.py index 1934185..b4f47cb 100644 --- a/girok/config.py +++ b/girok/config.py @@ -1,23 +1 @@ -from functools import lru_cache import typer -from pathlib import Path -import girok.utils.general as general_utils -import os - -cur_file_dir = os.path.dirname(os.path.realpath(__file__)) - -class Config: - def __init__(self): - self.config = general_utils.read_json(os.path.join(cur_file_dir, "config.json")) - self.base_url = self.config['base_url'] - self.app_name = self.config['app_name'] - self.app_dir = typer.get_app_dir(self.app_name) - self.config_path: Path = Path(self.app_dir) / "config.json" - self.version = self.config['version'] - - -@lru_cache() -def get_config(): - return Config() - -
\ No newline at end of file |