artemis/titles/fgoa/config.py
2024-03-19 06:59:46 +00:00

25 lines
643 B
Python

from core.config import CoreConfig
class FGOAServerConfig:
def __init__(self, parent: "FGOAConfig") -> None:
self.__config = parent
@property
def enable(self) -> bool:
return CoreConfig.get_config_field(
self.__config, "fgo", "server", "enable", default=True
)
@property
def loglevel(self) -> int:
return CoreConfig.str_to_loglevel(
CoreConfig.get_config_field(
self.__config, "fgo", "server", "loglevel", default="info"
)
)
class FGOAConfig(dict):
def __init__(self) -> None:
self.server = FGOAServerConfig(self)