Get the item from redis.
168340
def get(self):
        ''''''

        key = self.get_key_from_request()
        result = self.get_storage().get(key)

        return result if result else None
1069305
def _get_things(self, method, thing, thing_type, params=None, cacheable=True):
        """"""

        limit = params.get("limit", 1)
        seq = []
        for node in _collect_nodes(
            limit, self, self.ws_prefix + "." + method, cacheable, params
        ):
            title = _extract(node, "name")
            artist = _extract(node, "name", 1)
            playcount = _number(_extract(node, "playcount"))

            seq.append(TopItem(thing_type(artist, title, self.network), playcount))

        return seq
1365692
def getitem(source, index):
    
    if isinstance(index, builtins.slice):
        return slice.raw(source, index.start, index.stop, index.step)
    if isinstance(index, int):
        return item.raw(source, index)
    raise TypeError("Not a valid index (int or slice)")
604978
def get_session_value(self, name, default=None):
        """"""

        value = self.redis().hget(self._session_key, name) or default
        self._update_session_expiration()
        return value
9168
def get_token(opts, tok):
    '''
    
    '''
    redis_client = _redis_client(opts)
    if not redis_client:
        return {}
    serial = salt.payload.Serial(opts)
    try:
        tdata = serial.loads(redis_client.get(tok))
        return tdata
    except Exception as err:
        log.warning(
            'Authentication failure: cannot get token %s from redis: %s',
            tok, err
        )
        return {}
340507
def get_item(key):
    """"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    try:
        return json.loads(open(CACHED_KEY_FILE, "rb").read().decode('UTF-8'))["_"]
    except (IOError, ValueError):
        return None
182756
def get(self, key, alt=None):
        
        with self.lock:
            if key in self:
                return self.getitem(key)

            else:
                return alt
366020
def get_existing_item(self, item):
        
        params = {
            'project_id': item.project_id,
            'from_user_id': item.from_user_id,
            'to_user_id': item.to_user_id,
        }
        resp = requests.get(self.make_url(item.destination), headers=self.json_headers, params=params)
        self.check_response(resp)
        return resp
220884
def get(self, key, recursive=False, sorted=False, quorum=False,
            timeout=None):
        """"""
        return self.adapter.get(key, recursive=recursive, sorted=sorted,
                                quorum=quorum, timeout=timeout)
902652
public function get($key)
    {
        try {
            return $this->redis->get($key);
        } catch (\RedisException $e) {
            die("Error!: " . $e->getMessage() . "<br/>");
        }
    }
1305746
def get(self, res, pk):
        ""
        B = get_backend()
        return B.get_object(B.get_concrete(res), pk)
1320136
def get(self, transaction=None):
        """"""
        warnings.warn(
            "'Query.get' is deprecated:  please use 'Query.stream' instead.",
            DeprecationWarning,
            stacklevel=2,
        )
        return self.stream(transaction=transaction)
1221923
function (req, res) {
            self.getItems(function (err, result) {
                if (!err) {
                    res.json( result );
                } else {
                    res.json(500, { error: err });
                }
            });
        }
707425
def get_redis_info():
    """"""
    from kombu.utils.url import _parse_url as parse_redis_url
    from redis import (
        StrictRedis,
        ConnectionError as RedisConnectionError,
        ResponseError as RedisResponseError,
    )
    for conf_name in ('REDIS_URL', 'BROKER_URL', 'CELERY_BROKER_URL'):
        if hasattr(settings, conf_name):
            url = getattr(settings, conf_name)
            if url.startswith('redis://'):
                break
    else:
        log.error("No redis connection info found in settings.")
        return {"status": NO_CONFIG}
    _, host, port, _, password, database, _ = parse_redis_url(url)

    start = datetime.now()
    try:
        rdb = StrictRedis(
            host=host, port=port, db=database,
            password=password, socket_timeout=TIMEOUT_SECONDS,
        )
        info = rdb.info()
    except (RedisConnectionError, TypeError) as ex:
        log.error("Error making Redis connection: %s", ex.args)
        return {"status": DOWN}
    except RedisResponseError as ex:
        log.error("Bad Redis response: %s", ex.args)
        return {"status": DOWN, "message": "auth error"}
    micro = (datetime.now() - start).microseconds
    del rdb  # the redis package does not support Redis's QUIT.
    ret = {
        "status": UP, "response_microseconds": micro,
    }
    fields = ("uptime_in_seconds", "used_memory", "used_memory_peak")
    ret.update({x: info[x] for x in fields})
    return ret
39223
public function getItem($key)
    {
        $data = $this->redis->get($key);
        if ($data !== false) {
            $data = json_decode($data, true);
            if ((($data['ttl'] == 0) || ((time() - $data['start']) <= $data['ttl']))) {
                $value = $data['value'];
            } else {
                $this->deleteItem($id);
            }
        } else {
            $this->deleteItem($id);
        }

        return (isset($value)) ? $value : false;
    }
1325682
function _getRedisItem (config) {
  let key = _buildRedisKey(config.redisKey, config.language)
  return config.redis.hgetallAsync(key)
}
245498
def get(self, item, default=None):
        
        if hasattr(self, item):
            return getattr(self, item)
        try:
            return self.__getitem__(item)

        except KeyError:
            return default