2808 explained code solutions for 75 technologies


python-redisDecode bytes obtained from Redis to string


r = redis.Redis()
val = r.get('test').decode('utf-8')ctrl + c
redis.Redis

connect to Redis server

r.get

gets value by key from Redis

test

key to get value from

decode('utf-8')

decodes bytes into string (using utf-8 charset in our case)