python_marshal 0.4.7

A Rust library for reading and writing Python marshal files.
Documentation
1
2
3
4
5
6
7
use python_marshal::load_bytes;

fn main() {
    let data = b"z\x15A string from Python!"; // A simple string marshalled by Python 3.10
    let (obj, _) = load_bytes(data, (3, 10).into()).unwrap(); // Specify the Python version that was used to marshal the data
    println!("{:?}", obj);
}