Skip to main content

unpack archive files

Project description

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
#-#

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyunpack-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file pyunpack-0.1.1.tar.gz.

File metadata

  • Download URL: pyunpack-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyunpack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fcfb553b0bca180a2314763afa0aa4b2cfd4f606c5b52d7c5daa62ac1e78ebcc
MD5 907c14c060de7ee184fb2f9e7b45ff55
BLAKE2b-256 1545beeb30f7bd0be09b4fbdb808122bad3c63caeccd0161b54e99669657ba81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page