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 the ArchExtractor class, set the source and destination paths
extractor = ArchExtractor(
    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)
)

# Extract all the archive files in the source path, including the nested archive files
extractor.extractall(
    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.1.3.tar.gz (29.6 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.1.3-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for archextractor-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b55a6e664c36abc19a656b7c252ee04811352365c2778d20708158df00050b4d
MD5 894f1ad47932aebbfb03748d1a5210a8
BLAKE2b-256 f77860616c19828322254d3fdfed738df98c6e74d012830274340955d096cc0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.1.3.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.1.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for archextractor-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9f51f10789b07b2dc090296087c3ecb595f5d404d675edf332d8898ecceaf59
MD5 41117c542c5f294e214815ff1a8a9391
BLAKE2b-256 8bd00f84f8f70bbbff41dcf47f4a9e12a093f85ccf81b7a867aa197161683e79

See more details on using hashes here.

Provenance

The following attestation bundles were made for archextractor-0.1.3-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