コード例 #1
0
ファイル: models.py プロジェクト: ccheadle/marcel
 def get(self, uid):
     """ Retrieves record `uid` from Redis """
     item = redis.hgetall("marcel:%s:%s" % (self.type, uid))
     item['type'] = self.type
     item['pubdate'] = dateutil.parser.parse(item['pubdate'])
     return item
コード例 #2
0
ファイル: models.py プロジェクト: ccheadle/marcel
 def get(self):
     """ Retrieve a User from Redis """
     return redis.hgetall(self.key)