def get(
                self,
                key,
                index=None,
                recurse=False,
                wait=None,
                token=None,
                consistency=None,
                keys=False,
                separator=None,
                dc=None):
            """
            Returns a tuple of (*index*, *value[s]*)

            *index* is the current Consul index, suitable for making subsequent
            calls to wait for changes since this query was last run.

            *wait* the maximum duration to wait (e.g. '10s') to retrieve
            a given index. this parameter is only applied if *index* is also
            specified. the wait time by default is 5 minutes.

            *token* is an optional `ACL token`_ to apply to this request.

            *keys* is a boolean which, if True, says to return a flat list of
            keys without values or other metadata. *separator* can be used
            with *keys* to list keys only up to a given separator character.

            *dc* is the optional datacenter that you wish to communicate with.
            If None is provided, defaults to the agent's datacenter.

            The *value* returned is for the specified key, or if *recurse* is
            True a list of *values* for all keys with the given prefix is
            returned.

            Each *value* looks like this::

                {
                    "CreateIndex": 100,
                    "ModifyIndex": 200,
                    "LockIndex": 200,
                    "Key": "foo",
                    "Flags": 0,
                    "Value": "bar",
                    "Session": "adf4238a-882b-9ddc-4a9d-5b6758e4159e"
                }

            Note, if the requested key does not exists *(index, None)* is
            returned. It's then possible to long poll on the index for when the
            key is created.
            """
            assert not key.startswith('/'), \
                'keys should not start with a forward slash'
            params = {}
            if index:
                params['index'] = index
                if wait:
                    params['wait'] = wait
            if recurse:
                params['recurse'] = '1'
            token = token or self.agent.token
            if token:
                params['token'] = token
            dc = dc or self.agent.dc
            if dc:
                params['dc'] = dc
            if keys:
                params['keys'] = True
            if separator:
                params['separator'] = separator
            consistency = consistency or self.agent.consistency
            if consistency in ('consistent', 'stale'):
                params[consistency] = '1'

            def callback(response):
                if response.code == 500:
                    raise ConsulException(response.body)
                elif response.code == 404:
                    data = None
                else:
                    data = json.loads(response.body)
                    if not keys:
                        for item in data:
                            if item.get('Value') is not None:
                                item['Value'] = base64.b64decode(item['Value'])
                        if not recurse:
                            data = data[0]
                return response.headers['X-Consul-Index'], data

            return self.agent.http.get(
                callback, '/v1/kv/%s' % key, params=params)
dataset/ETHPy150Open cablehead/python-consul/consul/base.py/Consul.KV.get/original