import redis
r = redis.Redis(host='localhost', port=6379)
# Set Redis String
r.set('age', 1)
# Set Hash in one line
r.hset('animals', 'mammals', 'dog')
r.hset('animals', 'mammals', 'pig')
# Set Hash Multiple (Use Dictionary Object)
r.hmset('people' {
'dan': 1,
'matt': 'string'
'jesse': "string"
})
# Get all the results from Hash
r.hgetall('people')