Python Zipfile Module
ZIP archive handling — ZipFile, extract, extractall, namelist. This category documents 7 Python zipfile module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: zipfile.ZipFile(), zipfile.ZipFile.extractall(), zipfile.ZipFile.extract(), zipfile.ZipFile.namelist(), zipfile.ZipFile.getinfo(), zipfile.ZipFile.close(), zipfile.is_zipfile(). zipfile.ZipFile() opens a ZIP file for reading, writing, or appending. zipfile.ZipFile.extractall() extracts all ZIP contents into the current or specified directory. zipfile.ZipFile.extract() extracts a single file from the ZIP archive. zipfile.ZipFile.namelist() returns a list of all files and directories in the ZIP archive. zipfile.ZipFile.getinfo() returns information about a file in the archive (size, compress_size, date_time). Zipfile Module belongs to the File & Data group alongside Pathlib Module, Shutil Module, Glob Module, Fileinput Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.