You are setting individual fields of a Redis hash one by one (a hash is the common data structure in Redis to store objects).
A better way to do this is to use Redis HMSET command, that allows to set multiple fields of a given hash in one operation. Using Redis-py it will look like this:
import redis
redisdb = redis.Redis(host="localhost",db=1)
redisdb.hmset('post:1', {'title':'Redis is cool!', 'author':'haye321'})
update:
Of course you could have set Hash field members one by one using the HSET command, but it's less efficient as it requires one request per field:
import redis
redisdb = redis.Redis(host="localhost",db=1)
redisdb.hset('post:1', 'title', 'Redis is cool!')
redisdb.hset('post:1', 'author', 'haye321'})