p / redis-dump-load

Dump redis databases, load data into redis - in Python
BSD 2-Clause "Simplified" License
175 stars 76 forks source link

Pickled values #37

Closed polcar closed 8 years ago

polcar commented 8 years ago

I am storing pickled python object as Redis values. I would like to specify function that convert (depickle/jsonifu) redis values. Is it possible?

p commented 8 years ago

redis-dump-load should be able to dump these values like any other string values. There is no need to depickle them.

polcar commented 8 years ago

I see but I what I want is to dump a human-readable data.

p commented 8 years ago

You could do this fairly straightforwardly by overwriting _reader and _writer methods with ones that unpickle and pickle the values, respectively, and delegate to the base methods for the actual reading and writing.