kvstore.py
def index(self, k, recursive=False):
        """Get the current index of the key or the subtree.
        This is needed for later creating long polling requests
        """
        k = k.lstrip('/')
        url = '{}/{}'.format(self.endpoint, k)
        params = {}
        if recursive:
            params['recurse'] = ''
        r = requests.get(url, params=params)
        return r.headers['X-Consul-Index']
def index(self, k, recursive=False):
        """Get the current index of the key or the subtree.
        This is needed for later creating long polling requests
        """
        k = k.lstrip('/')
        url = '{}/{}'.format(self.endpoint, k)
        params = {}
        if recursive:
            params['recurse'] = ''
        r = requests.get(url, params=params)
        return r.headers['X-Consul-Index']
Get the current index of the key or the subtree.
        This is needed for later creating long polling requests