1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
from cached_property import cached_property from configlib import BaseConfig from github import Github class GithubConfig(object): access_token: str @cached_property def github(self): return Github(self.access_token) class Config(BaseConfig): token: str github: GithubConfig config = Config.get_instance()