fastar

High-level bindings for the Rust tar crate.

Latest version: 0.11.0 registry icon
Maintenance score
100
Safety score
100
Popularity score
3
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
0.11.0 0 0 0 0 0
0.10.1 0 0 0 0 0
0.10.0 0 0 0 0 0
0.9.0 0 0 0 0 0
0.8.0 0 0 0 0 0
0.7.0 0 0 0 0 0
0.6.0 0 0 0 0 0
0.5.0 0 0 0 0 0
0.4.0 0 0 0 0 0
0.3.0 0 0 0 0 0
0.2.0 0 0 0 0 0
0.1.0 0 0 0 0 0

Stability
Latest release:

0.11.0 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MIT   -   MIT License

Not a wildcard

Not proprietary

OSI Compliant



Fastar

Versions PyPI Downloads License CodSpeed

The fastar library wraps the Rust tar, flate2, and zstd crates, providing a high-performance way to work with compressed and uncompressed tar archives in Python.

Installation

pip install fastar

Usage

This section shows basic examples of how to create and extract tar archives using Fastar. For more usage examples, please refer directly to the test cases in the tests directory.

import fastar
from pathlib import Path


input_file = Path("file.txt")
input_file.write_text("Hello, Fastar!")


with fastar.open("archive.tar", "w") as archive:
    archive.append(input_file)


with fastar.open("archive.tar", "r") as archive:
    archive.unpack("output/")


unpacked_file = Path("output/file.txt")
print(unpacked_file.read_text())  # Hello, Fastar!

Opening Modes

The fastar.open method supports the following modes:

Mode Action Compression
"w" Write None
"w:gz" Write Gzip
"w:zst" Write Zstandard
"r" Read Automatically detected
"r:" Read None
"r:gz" Read Gzip
"r:zst" Read Zstandard

Development

  1. Install dependencies into a virtual env: uv sync
  2. Make changes to the code and tests
  3. Build the package: uv run maturin develop
  4. Run the tests: uv run pytest