Skip to main content

Unified interface for tar, zip, sevenzip, and rar files

Project description


Logo

Unified interface for tar, zip, sevenzip, and rar files

PyPI - Version PyPI - Python Version License Checked with mypy Ruff

GitHub Workflow Status (with event) GitHub Actions Workflow Status codecov

Table Of Contents

About

archivefile is a wrapper around tarfile, zipfile, py7zr, and rarfile. It simplifies archive management tasks by providing a unified interface.

Installation

archivefile is available on PyPI, so you can simply use pip to install it.

pip install archivefile

Usage

from archivefile import ArchiveFile

with ArchiveFile("archive.tar", "w") as archive:
    archive.extract("member.txt") # Extract a single member of the archive

with ArchiveFile("archive.tar", "w") as archive:
    archive.extractall(destination="~/output") # Extract all members

with ArchiveFile("archive.tar") as archive:
    archive.read_text("member.txt") # Read a member of the archive

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

archivefile-0.1.0.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

archivefile-0.1.0-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

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