import pickle import redis r = redis.StrictRedis(host='localhost', port=6379, db=0) obj = ExampleObject() pickled_object = pickle.dumps(obj) r.set('some_key', pickled_object) unpacked_object = pickle.loads(r.get('some_key')) obj == unpacked_object
Hiç yorum yok:
Yorum Gönder