File size: 304 Bytes
2b0ce36
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import zipfile, os

def zip_response(archive_name: str, files: list):
    # Create a new zip file
    with zipfile.ZipFile(archive_name, 'w') as zipf:
    # Add specific files to the zip file
        for file in files:
            zipf.write(file, arcname=os.path.basename(file))
    return archive_name