def get_file_path(self, url, dir_path):
        _, host, path, _, _, _ = urlparse(url)
        hash, path_ext = sha1((host + path).encode('utf-8')), '.csv'

        # With no source prefix like "us-ca-oakland" use the host as a hint.
        name_base = '{}-{}'.format(self.source_prefix or host, hash.hexdigest()[:8])

        _L.debug('Downloading {} to {}{}'.format(url, name_base, path_ext))

        return os.path.join(dir_path, name_base + path_ext)
Return a local file path in a directory for a URL.
dataset/ETHPy150Open openaddresses/machine/openaddr/cache.py/EsriRestDownloadTask.get_file_path