Redis ã® Python ã¯ã©ã¤ã¢ã³ãã® redis-py ã§ä»¥ä¸ã®ãããªäºããã£ã¦ã¿ãã # -*- coding: utf-8 -*- from redis import Redis client = Redis(host=localhost) data = {u'foo': u'bar', u'baz': ['aaa', 'bbb', 'ccc']} client.set('sample', data) ret = client.get('sample') print ret set ã«ã¯ key, value ãããã¡ãªã¯ããªã®ã§ããã®ã³ã¼ãã¯ã¨ã©ã¼ã«ãªãã¨æã£ã¦ãããRedis ãã get ããéã«å¤ãæååã¨ãã¦åããã # redis-py ã®å é¨ã§ str() ã§å¤æãã¦ããã æååã ã¨åãåããã¡ã³ãã¯ãµã¤ã®ã§ã以å㯠value ã MessagePack ã§ã·
{{#tags}}- {{label}}
{{/tags}}