Skip to main content

unpack archive files

Links:

Travis Coveralls Latest Version Supported Python versions License Downloads Code Health Documentation

Features:
  • unpack archive files without password

  • very simple interface

  • command line interface and library

  • supported python versions: 2.7, 3.3, 3.4, 3.5

  • back-ends:
    • zipfile: included in Python

    • patool: It relies on helper applications to handle those archive formats (for example bzip2 for BZIP2 archives). Supported formats: 7z (.7z), ACE (.ace), ALZIP (.alz), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), compress (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), GZIP (.gz), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), TAR (.tar), XZ (.xz), ZIP (.zip, .jar) and ZOO (.zoo)

Background

patool is called by pyunpack using its command line interface. If Patool is not installed then only zip format can be unpacked using the internal python zipfile library.

Usage

>>> from pyunpack import Archive
>>> Archive('a.zip').extractall('/path/to')

or on console:

python -m pyunpack.cli a.zip /path/to

Similar projects

Installation

General

  • install pip

  • install unpackers for patool (optional)

  • install patool (optional)

  • install the program:

    # as root
    pip install pyunpack

Ubuntu

sudo apt-get install python-pip
sudo pip install pyunpack
#optional
sudo pip install patool
sudo pip install entrypoint2
sudo apt-get install unzip unrar p7zip-full

Uninstall

# as root
pip uninstall pyunpack

command line help

#-- sh('python -m pyunpack.cli --help')--#
usage: cli.py [-h] [-b BACKEND] [-a] [--debug] filename directory

positional arguments:
  filename              path to archive file
  directory             directory to extract to

optional arguments:
  -h, --help            show this help message and exit
  -b BACKEND, --backend BACKEND
                        auto, patool or zipfile
  -a, --auto-create-dir
                        auto create directory
  --debug               set logging level to DEBUG
#-#

Metadata

Release files for pyunpack 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyunpack 0.1.2
File Size Uploaded
pyunpack-0.1.2.tar.gz 6.5 kB Details

Release files / pyunpack-0.1.2.tar.gz

Download URL pyunpack-0.1.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4668ae507c26ac2ac2847ef83e8d6adfed86721f3a9346c2dfc92066f26d8fe7
BLAKE2b-256 checksum
How to use checksums
79dc44cd41fb99d184ae7c2eac439a52ca624d5ece62b0302c3437fcc4ce3b58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page