def __init__(self): """ ____ORM class is the ORM class wizard to gather and summon all the models registered and send it to the attribute class____ """ self.model = lambda: None for k, v in auto('dbs', 'models', 'dbs/models').items(): setattr(self.model, v.__name__, v)
def __init__(self): """ ____Schemas is used to gather all the models registered in package models, and set it as attribute variable for class it self____ """ self.model = lambda: None for k, v in auto('dbs', 'models', 'dbs/models').items(): setattr(self.model, v.__name__, v)
def __init__(self): """ ## **DB** ____This class is served as class declared all the model from the directory, collected and gather into one property class so which class inherit DB can use all the model by calling the attribute____ """ self.model = lambda: None for k, v in auto('databases', 'models', 'databases/models').items(): setattr(self.model, v.__name__, v)
def resources(self): for k, v in auto('apps', 'resources', 'apps/resource').items(): url = k.replace('apps.resources', '').split('.')[:-1] url = os.path.join(*url) if len(url) > 1 else '' self.resource(v, f'/{url}')