library python to zip code example
Example 1: python zip file open as text
with ZipFile('spam.zip') as myzip:
with myzip.open('eggs.txt') as myfile:
eggs = io.TextIOWrapper(myfile)
Example 2: how to unzip files using zipfile module python
import zipfile
with zipfile.ZipFile("file.zip","r") as zip_ref:
zip_ref.extractall("targetdir")