An efficient, secure, and USTAR-compatible TAR streaming engine.
Project description
TarTape
TarTape is a TAR archive generation engine designed with a focus on streaming and explicit control over the archiving process.
It is built for environments where generating a full TAR file in memory or via temporary disk files is not feasible or desirable—such as data pipelines, web services, or resource-constrained systems.
Rather than replacing traditional TAR tools, TarTape offers a predictable and observable alternative for scenarios where data flow integrity is paramount.
Leer versión en español (Spanish)
Key Features
-
True Data Streaming
Generates a continuous byte stream, facilitating integration into pipelines where the final file doesn't need to reside on disk (e.g., direct cloud uploads). -
Memory Efficiency
RAM consumption remains low and constant, regardless of the total archive size. This allows for processing massive data volumes predictably. -
Observability
Unlike a "black box," TarTape emits events throughout the process. You can monitor exactly which file is being processed and react in real-time. -
Integrity First
The engine verifies that files do not change size while being read (e.g., active logs). If a discrepancy is detected, it raises an explicit error to prevent silent archive corruption.
Installation
pip install git+https://github.com/CalumRakk/tartape.git
Usage Examples
Basic Usage: Generate a TAR file
In the simplest case, TarTape emits the TAR file bytes as a stream that can be written directly to a file.
from tartape import TarTape, TarEventType
tape = TarTape()
tape.add_folder("./my_data")
with open("backup.tar", "wb") as f:
for event in tape.stream():
if event.type == TarEventType.FILE_DATA:
f.write(event.data)
Streaming with Monitoring and Control
TarTape exposes the archiving process through events, allowing you to observe what happens at each stage of the stream.
from tartape import TarTape, TarEventType
tape = TarTape()
tape.add_folder("/var/log/app")
for event in tape.stream():
if event.type == TarEventType.FILE_START:
# Emitted before processing a file
print(f"Archiving: {event.entry.arc_path} ({event.entry.size} bytes)")
elif event.type == TarEventType.FILE_DATA:
# Raw TAR bytes (headers, content, and padding)
# These can be sent directly to a network socket or a bucket
pass
elif event.type == TarEventType.FILE_END:
# Emitted when a file is finished
# Includes metadata like the MD5 hash calculated during the read
print(f"File completed. MD5: {event.metadata.md5sum}")
elif event.type == TarEventType.TAPE_COMPLETED:
print("TAR archive completed successfully.")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tartape-1.5.0.tar.gz.
File metadata
- Download URL: tartape-1.5.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e32d99709f5d0dc5823dc00eec15dcd527eba15d51dbc5d1924504c3eb997aa
|
|
| MD5 |
ea470ec2cdfea5fe552eeea7529d07be
|
|
| BLAKE2b-256 |
aee4dd884a028fd6da5276cf6308f6cdd763b529c0fc9bf1fe7df253901ef7aa
|
Provenance
The following attestation bundles were made for tartape-1.5.0.tar.gz:
Publisher:
publish.yml on CalumRakk/tartape
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tartape-1.5.0.tar.gz -
Subject digest:
2e32d99709f5d0dc5823dc00eec15dcd527eba15d51dbc5d1924504c3eb997aa - Sigstore transparency entry: 870889363
- Sigstore integration time:
-
Permalink:
CalumRakk/tartape@6e68f1d3c8ac9ea491c2dc7e480b796094d1eb9c -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/CalumRakk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6e68f1d3c8ac9ea491c2dc7e480b796094d1eb9c -
Trigger Event:
push
-
Statement type:
File details
Details for the file tartape-1.5.0-py3-none-any.whl.
File metadata
- Download URL: tartape-1.5.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d612e869546f6fe05bf730afaab0a9f66475cc40dad20a47a0f36e5f79597cb
|
|
| MD5 |
ebff75ba16f3c7d5abff0393b9a43269
|
|
| BLAKE2b-256 |
77d74dd38a99cbcedfff87bae4b0ce04d8850e68681c6e4533c6618223194e61
|
Provenance
The following attestation bundles were made for tartape-1.5.0-py3-none-any.whl:
Publisher:
publish.yml on CalumRakk/tartape
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tartape-1.5.0-py3-none-any.whl -
Subject digest:
0d612e869546f6fe05bf730afaab0a9f66475cc40dad20a47a0f36e5f79597cb - Sigstore transparency entry: 870889366
- Sigstore integration time:
-
Permalink:
CalumRakk/tartape@6e68f1d3c8ac9ea491c2dc7e480b796094d1eb9c -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/CalumRakk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6e68f1d3c8ac9ea491c2dc7e480b796094d1eb9c -
Trigger Event:
push
-
Statement type: