langchain_postgres.checkpoint
.PickleCheckpointSerializer¶
- class langchain_postgres.checkpoint.PickleCheckpointSerializer[source]¶
Use the pickle module to serialize and deserialize objects.
This serializer uses the pickle module to serialize and deserialize objects.
While pickling can serialize a wide range of Python objects, it may fail de-serializable objects upon updates of the Python version or the python environment (e.g., the object’s class definition changes in LangGraph).
- Security Warning: The pickle module can deserialize malicious payloads,
only use this serializer with trusted data; e.g., data that you have serialized yourself and can guarantee the integrity of.
Methods
__init__
()dumps
(obj)Serialize an object to bytes.
loads
(data)Deserialize an object from bytes.
- __init__()¶