PyVegh is the official Python binding for the Vegh snapshot engine, developed by CodeTease.
It delivers the raw performance of Rust (Zstd multithreaded compression, Tar archiving, Blake3 hashing) wrapped in a modern, flexible Python interface.
"Tight packing, swift unpacking, no nonsense."
- Blazing Fast: Core logic is implemented in Rust using PyO3, utilizing Zstd Multithreading and the next-gen Blake3 hashing algorithm.
- Analytics Dashboard: Instantly visualize your project's Lines of Code (LOC) with a beautiful terminal dashboard—no extraction required.
- Dry-Run Mode: Simulate snapshot creation to check file sizes and detect sensitive data risks before packing.
- Integrity v2: Verify data integrity at lightning speed with Blake3 and inspect metadata (author, timestamp, tool version) without unpacking.
- Smart Upload: Built-in
sendcommand supporting concurrent Chunked Uploads for large files. - Smart Filtering: Automatically respects
.veghignoreand.gitignorerules.
Install directly from PyPI:
pip install pyveghOr build from source (requires Rust):
maturin develop --releasePyVegh provides a powerful command-line interface via the vegh (or pyvegh) command.
Set up your default server URL and Auth Token so you don't have to type them every time.
vegh config
# Or one-liner:
vegh config --url https://api.teaserverse.online/test --auth YOUR_TOKENPack a directory into a highly compressed snapshot.
# Basic snapshot
vegh snap ./my-project --output backup.snap
# Dry-Run (Simulation) - Check for large/sensitive files
vegh snap ./my-project --dry-runView the CodeTease Analytics Dashboard to break down your project by language and lines of code.
vegh loc backup.snapCheck file integrity (Blake3) and view embedded metadata.
vegh check backup.snapRestore the snapshot to a target directory.
vegh restore backup.snap ./restored-folderSend the snapshot to a remote server. PyVegh now supports Chunked Uploads for reliability.
# Auto-detects if chunking is needed, or force it:
vegh send backup.snap --force-chunkYou can also use PyVegh as a library in your own Python scripts:
import json
from vegh import create_snap, restore_snap, check_integrity, get_metadata
# 1. Create a snapshot
# Returns the number of files compressed
count = create_snap("src_folder", "backup.snap", comment="Automated backup")
print(f"Compressed {count} files.")
# 2. Check integrity (Now uses Blake3)
checksum = check_integrity("backup.snap")
print(f"Blake3 Hash: {checksum}")
# 3. Read Metadata (Fast, no unpacking)
raw_meta = get_metadata("backup.snap")
meta = json.loads(raw_meta)
print(f"Snapshot created by: {meta.get('author')}")
# 4. Restore
restore_snap("backup.snap", "dest_folder")This project is under the MIT License.