MCPcopy
hub / github.com/reflex-dev/reflex / deserialize

Method deserialize

reflex/istate/manager/token.py:175–191  ·  view source on GitHub ↗

Deserialize the BaseState from redis/disk. data and fp are mutually exclusive, but one must be provided. Args: data: The serialized state data. fp: The file pointer to the serialized state data. Returns: The deserialized BaseState instan

(
        cls, data: bytes | None = None, fp: BinaryIO | None = None
    )

Source from the content-addressed store, hash-verified

173
174 @classmethod
175 def deserialize(
176 cls, data: bytes | None = None, fp: BinaryIO | None = None
177 ) -> BaseState:
178 """Deserialize the BaseState from redis/disk.
179
180 data and fp are mutually exclusive, but one must be provided.
181
182 Args:
183 data: The serialized state data.
184 fp: The file pointer to the serialized state data.
185
186 Returns:
187 The deserialized BaseState instance.
188 """
189 from reflex.state import BaseState
190
191 return BaseState._deserialize(data, fp)
192
193 @classmethod
194 def get_and_reset_touched_state(cls, state: BaseState) -> bool:

Callers

nothing calls this directly

Calls 1

_deserializeMethod · 0.80

Tested by

no test coverage detected