23 lines
537 B
Python
23 lines
537 B
Python
import random
|
|
import yaml
|
|
from typing import Tuple
|
|
|
|
"""
|
|
TODO description
|
|
"""
|
|
class ConfigurationManager:
|
|
|
|
CONFIG_FILE_LOCATION = "config.yaml"
|
|
configuration = []
|
|
|
|
@classmethod
|
|
def load(cls) -> None:
|
|
with open(cls.CONFIG_FILE_LOCATION, "r") as yaml_file:
|
|
cls.configuration = yaml.safe_load(yaml_file)
|
|
|
|
@classmethod
|
|
def get(cls, key: str, sub_key: str = None):
|
|
if sub_key:
|
|
return cls.configuration[key][sub_key]
|
|
else:
|
|
return cls.configuration[key] |