def load(self, cookies, **kwargs):
        """Load session from cookies."""
        value = cookies.get(self.key, None)
        if value is None:
            return False

        value = self.decrypt(value)
        if not value:
            return False

        data = json.loads(value)
        if not isinstance(data, dict):
            return False

        self.store = data
        self.update(self.store)
def load ( self , cookies , ** kwargs ) : value = cookies . get ( self . key , None ) if value is None : return False value = self . decrypt ( value ) if not value : return False data = json . loads ( value ) if not isinstance ( data , dict ) : return False self . store = data self . update ( self . store )
Load session from cookies.