Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import redis, json, pickle
  2. r = redis.StrictRedis(host='localhost', port=6379, db=2)
  3. def get_pretty_json():
  4. for key in r.scan_iter("larix*"):
  5. print (json.dumps(pickle.loads(r.get(key)), indent=4, sort_keys=True, ensure_ascii=False))
  6.  
  7. get_pretty_json()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement