def get_codes(self): codes = [] for obj in get_session().query(Code): if 1 == self.calculate(obj.code): codes.append(obj.code) return codes
def __init__(self, day, rate): self.day = day self.rate = rate self.session = get_session()
def general(self): for code in [obj.code for obj in get_session().query(Code)]: if not self.update(code): self.retry_codes.append(code)
def __init__(self, table_name): self.table_name = table_name self.session = get_session()
def __init__(self): self.session = get_session()