Skip to main content
https://github.com/ascoderu/xtarfile/workflows/CI/badge.svg https://img.shields.io/pypi/v/xtarfile.svg

Overview

Wrapper around tarfile to add support for more compression formats.

Usage

First, install the library with the tarfile compression formats you wish to support. The example below shows an install for zstandard tarfile support.

pip install xtarfile[zstd]

You can now use the xtarfile module in the same way as the standard library tarfile module:

import xtarfile as tarfile

with tarfile.open('some-archive', 'w:zstd') as archive:
    archive.add('a-file.txt')

with tarfile.open('some-archive', 'r:zstd') as archive:
    archive.extractall()

Alternatively, detecting the correct compression module based on the file extensions is also supported:

import xtarfile as tarfile

with tarfile.open('some-archive.tar.zstd', 'w') as archive:
    archive.add('a-file.txt')

with tarfile.open('some-archive.tar.zstd', 'r') as archive:
    archive.extractall()

Development

Install the project’s dependencies with pip install .[zstd].

Run the tests via python3 setup.py test.

Metadata

Release files for xtarfile 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xtarfile 0.2.1
File Size Uploaded
xtarfile-0.2.1.tar.gz 7.3 kB Details

Release files / xtarfile-0.2.1.tar.gz

Download URL xtarfile-0.2.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c257060eb0a1ba0dc51b2cf5869ee2d800618c612bc4b7a44bf83d984e0a5aa6
BLAKE2b-256 checksum
How to use checksums
709d60da9f45f0d8f259257b8b1960d33cae2d4aac34e5748d69569df3995e09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page