pyunpack
unpack archive files
What it is and what it does
pyunpack is a Python wrapper for unpacking archive files that provides both a library interface and command-line tool. It uses Python's built-in zipfile module for ZIP archives and delegates to the patool command-line tool for other formats like TAR, RAR, 7z, BZIP2, GZIP, and many others. The package supports password-protected archives and offers a simple API: instantiate an Archive object with a file path and call extractall() to extract to a directory.
The main trade-off is that ZIP extraction works out of the box, but other formats require external system tools to be installed separately. The package is dormant—last updated in 2022—so it receives no active maintenance. It works on Linux, macOS, and Windows, and supports Python 3.9, 3.10, 3.11, and 3.12 according to its description.
Use it for:
- Extract ZIP files in a Python script without external dependencies beyond the standard library.
- Unpack password-protected archives programmatically when external tools are available.
- Build a cross-platform archive extraction tool that handles multiple formats via a single Python interface.
- Automate archive extraction in a command-line workflow using the built-in CLI.
- Support diverse archive formats (7z, RAR, TAR, etc.) in a Python application by delegating to system tools.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Unpacks archive files in Python with support for multiple formats (ZIP, TAR, RAR, 7z, and many others) through either the built-in zipfile library or the patool command-line tool.
Yes, if you need to extract ZIP files or have external archive tools already installed and don't mind dormant maintenance. The low install friction and permissive license make it a reasonable choice for simple unpacking tasks. However, for active projects requiring frequent updates or password support, consider whether patool or another maintained alternative better fits your needs.
Install
pyunpack on PyPI
pip
pip install pyunpackuv
uv add pyunpackpoetry
poetry add pyunpackInstalling pyunpack
Before you install
Low install friction with just two lightweight runtime dependencies (easyprocess and entrypoint2). However, the package is dormant—last release was 2022-06-06 and last commit 2023-11-01—so maintenance is minimal. For formats beyond ZIP, you'll need to install external tools like unzip, unrar, or p7zip-full separately.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical use.
Quickstart
pip install pyunpack
from pyunpack import Archive
Archive('hello.zip').extractall('.')
For formats beyond ZIP, external command-line tools (unzip, unrar, p7zip-full, etc.) must be installed on the system; patool is recommended but its latest PyPI release is from 2016.
Verify before relying
- Whether patool's GitHub master branch (recommended for password support) is stable enough for production use
- Current compatibility with Python 3.12 despite classifier listing, given dormant maintenance status
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — easyprocess, entrypoint2 |
| Maintenance | dormant — 1,530 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 373,181/month — #7,154 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyunpack-0.3-py2.py3-none-any.whl
Keywords: unpack, archive
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
extractcodeExtracts a wide range of archive formats (tar,…
permissive · top 15,000 on PyPI
patoolPatool is a command-line archive manager that…
copyleft · top 5,000 on PyPI
rarfileReads RAR archive files (RAR3 and RAR5 formats)…
permissive · top 5,000 on PyPI
unix-arReads and writes AR archive files (Unix static…
permissive · top 5,000 on PyPI
py7zrpy7zr is a pure-Python library for reading,…
copyleft · top 5,000 on PyPI
unrarProvides Python access to RAR archive files…
copyleft · top 15,000 on PyPI
zip-filesProvides command-line tools to create zip files…
permissive · top 15,000 on PyPI
libarchive-clibarchive-c provides a Python interface to…
permissive · top 15,000 on PyPI
handy-archivesProvides utility functions for working with…
permissive · top 15,000 on PyPI
conda-package-handlingCreate, extract, and convert conda packages in…
permissive · top 15,000 on PyPI