Created
April 15, 2019 08:44
-
-
Save motionrus/cfbc14dfed38fb0d6a6905ff6f5c6328 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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