Redis를 DB Table처럼 활용하기
데이터 저장 및 탐색 방법 test.pyimport redis r = redis.StrictRedis(host=host, port=port, db=0) # inputr.hmset('id:a', {'ip':'192.168.10.1', 'port':1000})r.hmset('id:b', {'ip':'192.168.10.2', 'port':1001})r.hmset('id:c', {'ip':'192.168.10.3', 'port':1002})r.hmset('id:d', {'ip':'192.168.10.4', 'port':1003}) # outputkeys = r.keys('id:*')for key in keys: item = r.hgetall(key) print '%s:%s' % (item['ip'], item..