Add `get_data` method to `ConfigManager` for retrieving specific configuration keys

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda 2025-10-31 17:39:42 -03:00
parent c2b103f598
commit 46387123bc
1 changed files with 5 additions and 0 deletions

View File

@ -63,4 +63,9 @@ class ConfigManager(metaclass=SingletonMeta):
with open(f"{self.config_dir}/config.toml", "wb") as f:
tomli_w.dump(self.__data, f)
def get_data(self,key):
if key in self.__data.items():
return {key:self.__data[key]}
else:
return None