filename = 'temp.file'
req = urllib.request.urlopen('http://example.com/file.bz2')
CHUNK = 16 * 1024
decompressor = bz2.BZ2Decompressor()
with open(filename, 'wb') as fp:
    while True:
        chunk = req.read(CHUNK)
if not chunk:
    break
fp.write(decompressor.decompress(chunk))
req.close()
распаковать URL-адрес bz2 без временного файла в python