def getrange(self, key, start, end, *, encoding=_NOTSET):
        """Get a substring of the string stored at a key.

        :raises TypeError: if start or end is not int
        """
        if not isinstance(start, int):
            raise TypeError("start argument must be int")
        if not isinstance(end, int):
            raise TypeError("end argument must be int")
        return self.execute(b'GETRANGE', key, start, end, encoding=encoding)
Get a substring of the string stored at a key.

        :raises TypeError: if start or end is not int