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.2.tar.gz (29.5 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.2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: archextractor-0.1.2.tar.gz
  • Upload date:
  • Size: 29.5 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.2.tar.gz
Algorithm Hash digest
SHA256 3711a92646768d14cd9d6c2c746f4b130cc3200b0f646528202f7437b7dc87a1
MD5 6b3e814265f54181b45e506457e2a021
BLAKE2b-256 a9e466e2e76a8b3370b220a1583f062e3e2817f063b735baa9e785fa5241652c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: archextractor-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b2aa6e69ac76d47a06e8d6e354341010f21217436c1c8b100bfcf74c7902d92c
MD5 b7bc40908d6db26053457e052cdb3188
BLAKE2b-256 3cf1f206a4bbbda4689f5f542f31da7cd135cd24454768e63b07a097a62ce0e2

See more details on using hashes here.

Provenance

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