Skip to content

Pysafe PickleSafe, Fast, Schema-Evolvable Object Graph Serialization

Powered by Rust. Zero arbitrary code execution. Drop-in pickle API.

pysafe-pickle logo

Quick Example

python
import pysafe_pickle as psp
from dataclasses import dataclass

@dataclass
class User:
    name: str
    age: int
    email: str = ""
    __pysafe_pickle_version__ = 1

# Serialize safely with Rust
data = psp.dumps(User(name="Alice", age=30, email="alice@example.com"))

# Deserialize without arbitrary code execution
user = psp.loads(data)
assert user.name == "Alice"

Community & Ecosystem

Released under the AGPL-3.0 License.