def get_score_index(): key = "scr_index" mycnt = get_or_create(db.session, Counters, key=key) return mycnt.value
def count_stuff(key): if key == "playcount": mycnt = get_or_create(db.session, Counters, key=key) mycnt.value += 1 db.session.commit()
def save_score_index(start_index): key = "scr_index" mycnt = get_or_create(db.session, Counters, key=key) mycnt.value = start_index db.session.commit()
def get_broken_index(): key = "strt_index" mycnt = get_or_create(db.session, Counters, key=key) return mycnt.value
def get_index(key): if key in key_list: mycnt = get_or_create(db.session, Counters, key=key) return mycnt.value
def save_index(key, start_index): if key in key_list: mycnt = get_or_create(db.session, Counters, key=key) mycnt.value = start_index db.session.commit()
def print_stuff(key): if key == "playcount": mycnt = get_or_create(db.session, Counters, key=key) print(key + " ", mycnt.value)