Skip to content

Instantly share code, notes, and snippets.

@motionrus
Created April 15, 2019 08:44
Show Gist options
  • Save motionrus/cfbc14dfed38fb0d6a6905ff6f5c6328 to your computer and use it in GitHub Desktop.
Save motionrus/cfbc14dfed38fb0d6a6905ff6f5c6328 to your computer and use it in GitHub Desktop.
import redis, json, pickle
r = redis.StrictRedis(host='localhost', port=6379, db=2)
def get_pretty_json():
for key in r.scan_iter("larix*"):
print (json.dumps(pickle.loads(r.get(key)), indent=4, sort_keys=True, ensure_ascii=False))
get_pretty_json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment