Skip to main content

A module for extracting archive files, which wraps the patoolib library, can recursively process nested compressed package files.

Project description

ArchExtractor

A module for extracting archive files, which wraps the patoolib library, can recursively process nested compressed package files.

Installation

  • On Ubuntu
# Install the necessary decompression backend
>>> sudo apt-get install unzip unrar p7zip-full

# Install using pip
>>> python3 -m pip install archextractor

# or uv
>>> uv add archextractor
  • On MacOS
# Install the necessary decompression backend
>>> brew install 7zip rar

# Install using pip
>>> python3 -m pip install archextractor

# or uv
>>> uv add archextractor

Usage

from archextractor import ArchExtractor

# Initialize one reusable extractor
extractor = ArchExtractor()

# Extract all the archive files in the source path, including the nested archive files
extractor.extractall(
    src="/data/archive.tar",  # The source path of the archive file (only file path, not directory path)
    dst="/data/unpacked",  # The destination path of the extracted files (only directory path, not file path)
    mode="e",   # The mode of the extraction. If set to "e", the extracted files will be moved to the top level directory. If set to "x", the extracted files will be kept in the original directory structure
    verbosity=-1,  # See patoolib.extract_archive for more details
    cleanup=True,  # The source archive file will be deleted after extraction
)

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

archextractor-0.2.0.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

archextractor-0.2.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file archextractor-0.2.0.tar.gz.

File metadata

  • Download URL: archextractor-0.2.0.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archextractor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e01adde7eeb61165ac1c5beb26e283256fd8feb81078dd467f0c58ea4b04b888
MD5 380192c3fd8bbe83b56baf1662edcbd8
BLAKE2b-256 58c6ee944486899b9fd9c32f7128c07c5ebf8b5b2d89dd3c96ef9ec92b802a46

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.2.0.tar.gz:

Publisher: python-publish.yml on 2513502304/ArchExtractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file archextractor-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: archextractor-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for archextractor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2dfa81317692703b4a619a12a78a7633374c66c783525884baef29defab777fe
MD5 9101301be983d230ce85ce23ad1a15e0
BLAKE2b-256 b97b43554e3f4f7c9c8a1d80910a1c91884df65c7fa8d7577cfd2a8b774bb035

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on 2513502304/ArchExtractor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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