Unzipping files in Python
make_archive is already described in this answer. As for
import shutilshutil.unpack_archive(filename, extract_dir)
unpack_archive detects the compression format automatically from the "extension" of
.tar.gz, etc), and so does
extract_dir can be any path-like objects (e.g. pathlib.Path instances) since Python 3.7.