def download(self, url, savepath=None, filename=None):
        self.requests['stream'] = True   # We don't want to load the entire file into memory
        response = self.request('get', url, raw_response=True)
        self.requests['stream'] = False  # Return back this setting for all usual requests

        # If a savepath wasn't provided we return an iter_content method
        # so a user can call it with the desired parameters for maximum
        # control and iterate over the response data
        if savepath is None:
            return response.iter_content

        try:
            from urlparse import urlsplit
        except ImportError:
            from urllib.parse import urlsplit

        if filename is None:
            filename = urlsplit(url)[2].split('/')[-1]

            if not filename:
                raise FileUrlError

        savepath = os.path.join(savepath, filename)

        with open(savepath, 'wb') as f:
            for chunk in response.iter_content(1024):
                f.write(chunk)

        return savepath
Returns a query for this searchKey
dataset/ETHPy150Open maxtepkeev/python-redmine/redmine/__init__.py/Redmine.download--crossover with--dataset/ETHPy150Open sassoftware/conary/conary/repository/findtrove.py/QuerySetFactory.create