filename = 'temp.file'
req = urllib.request.urlopen('http://example.com/file.bz2')
CHUNK = 16 * 1024
decompressor = bz.BZ2Decompressor()
with open(filename, 'wb') as fp:
    while True:
        chunk = req.read(CHUNK)
if not chunk:
    break
decomp = decompressor.decompress(chunk)
if decomp:
    fp.write(decomp)
fp.close()
unpack bz2 url without temporary file in python