def __getitem__(self, item):
        """Return the value at key ``item`` or None if item doesn't exists

        :param item: item name
        :type item: str
        :return: value of item with given name
        :rtype: Any
        """
        logger.debug('call __getattr__ %s', item)

        # Check whether item exists inside Redis storage or not.
        if not self.__contains__(item):
            raise KeyError(item)

        key_type = self._redis.type(item)

        # Python3 compatibility
        if isinstance(key_type, bytes):
            key_type = key_type.decode()

        logger.debug('trying to get item %s of type %s', item, key_type)

        if key_type == 'hash':
            return self._redis.hgetall(item)
        elif key_type == 'list':
            return self._redis.lrange(item, 0, -1)
        elif key_type == 'set':
            return self._redis.smembers(item)
        elif str(key_type) == 'zset':
            return self._redis.zrange(item, 0, -1)
        return self._redis.get(item)
def __getitem__ ( self , item ) : logger . debug ( 'call __getattr__ %s' , item ) if not self . __contains__ ( item ) : raise KeyError ( item ) key_type = self . _redis . type ( item ) if isinstance ( key_type , bytes ) : key_type = key_type . decode ( ) logger . debug ( 'trying to get item %s of type %s' , item , key_type ) if key_type == 'hash' : return self . _redis . hgetall ( item ) elif key_type == 'list' : return self . _redis . lrange ( item , 0 , - 1 ) elif key_type == 'set' : return self . _redis . smembers ( item ) elif str ( key_type ) == 'zset' : return self . _redis . zrange ( item , 0 , - 1 ) return self . _redis . get ( item )
Return the value at key ``item`` or None if item doesn't exists

        :param item: item name
        :type item: str
        :return: value of item with given name
        :rtype: Any