Unpickle Python data in Node.js
This library allows to unpickle data pickled with Python 3.5 (up to pickle prococol 4).
WARNING: Not all pickle opcodes are supported. The library was created from scratch and I only added opcodes that I encountered in my test data.
Installation
Use npm (or yarn):
npm install unpickle
Usage
const data =
The following example unpickles Django session from Redis:
{ const data = await redis return }
Testing
git clone https://github.com/IlyaSemenov/node-unpickle.gitcd node-unpickleyarnnpm test
How to inspect pickle in Python
s = b"\x80\x04\x95....."import pickle; import pickletools; print();
Contributing
PRs and general feedback are welcome.