zip-streaming

Zip Streaming


Keywords
zip_streaming, buzon
License
MIT
Install
pip install zip-streaming==1.8

Documentation

Buzon - Zip-Streaming

Zip Streaming is a zip archive generator based on zipfile.py. It was created by Buzon.io to generate a zip file on-the-fly for download in a python application.

Install

pip install zip-streaming

Usage

    from zipfile import ZIP_DEFLATED
    import os, zip_streaming

    filelist = [
        "/to/path/large-file1.mp4",
        "/to/path/large-file2.mp4",
    ]

    z = zip_streaming.ZipFile( mode='w',
                               compression=ZIP_DEFLATED, 
                               allowZip64=True,
                               compresslevel=None,)
    for f in filelist:
        # get filename and write
        filename = os.path.basename(os.path.normpath(f))
        z.write(f, filename)

Requirements

Python > 3.7

License

This library was created by Buzon.io and is released under the MIT. Copyright 2019 Grow HQ, Inc.