skillfed

pyunpack

unpack archive files

pyunpack v0.3 373.2K downloads/30d#7,154 on PyPI109
Permissive license BSD DORMANT released

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 pyunpack

uv

uv add pyunpack

poetry

poetry add pyunpack

Installing 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

License :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

unpack archive files pythonextract zip tar rar 7zarchive extraction librarypassword-protected archive extractmulti-format archive supportcommand line archive toolpython archive unpacker
archive-extractioncli-tool

More Utilities packages