@classmethod
    def set_key(self, key, value=None):
        q = Config.select().where(Config.key == key)
        if q.count():
            Config.update(value=value).where(Config.key == key).execute()
        else:
            Config.create(key=key, value=value)
dataset/ETHPy150Open tsileo/bakthat/bakthat/models.py/Config.set_key/original