def set(self, key, value):
        self.session[key]=value
        self._is_dirty = True
        force_update = self.settings.get("force_persistence")
        if force_update:
            self.driver.save(self._id, self.session, self._expires)
            self._is_dirty = False
Add/Update session value
dataset/ETHPy150Open MitchellChu/torndsession/torndsession/session.py/SessionManager.set