Skip to main content

Python bindings for Vegh - The Snapshot Tool.

Project description

🥬 PyVegh

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."

Features

  • 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 send command supporting concurrent Chunked Uploads for large files.
  • Smart Filtering: Automatically respects .veghignore and .gitignore rules.
  • Vegh Hooks: Allow you to custom automation shell command while snapping.

Installation

Install directly from PyPI:

pip install pyvegh

Or build from source (requires Rust):

maturin develop --release

CLI Usage

PyVegh provides a powerful command-line interface via the vegh (or pyvegh) command.

1. Configuration

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_TOKEN

2. Create Snapshot

Pack a directory into a highly compressed snapshot.

# Basic snapshot
vegh snap ./my-project --output backup.vegh

# Dry-Run (Simulation) - Check for large/sensitive files
vegh snap ./my-project --dry-run

3. Analytics

View the CodeTease Analytics Dashboard to break down your project by language and lines of code.

vegh loc backup.vegh

4. Inspect & Verify

Check file integrity (Blake3) and view embedded metadata.

vegh check backup.vegh

5. Restore

Restore the snapshot to a target directory.

vegh restore backup.vegh ./restored-folder

6. Send

Send 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.vegh --force-chunk

7. Hooks example

Create a .veghhooks.json in your workspace.

{
  "hooks": {
    "pre": [
      "echo '🚀 Pre-snap hook started...'",
      "echo 'Preparing to backup...'",
      "echo 'Backing up database...'",
      "echo 'Backup completed.'"
    ],
    "post": [
      "echo '🎉 Snapshot completed!'",
      "echo 'Cleaning up...'"
    ]
  }
}

Library Usage

You 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.vegh", comment="Automated backup")
print(f"Compressed {count} files.")

# 2. Check integrity (Now uses Blake3)
checksum = check_integrity("backup.vegh")
print(f"Blake3 Hash: {checksum}")

# 3. Read Metadata (Fast, no unpacking)
raw_meta = get_metadata("backup.vegh")
meta = json.loads(raw_meta)
print(f"Snapshot created by: {meta.get('author')}")

# 4. Restore
restore_snap("backup.vegh", "dest_folder")

License

This project is under the MIT License.

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

pyvegh-0.3.3.tar.gz (28.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyvegh-0.3.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pyvegh-0.3.3-cp38-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

pyvegh-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

pyvegh-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

pyvegh-0.3.3-cp38-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pyvegh-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file pyvegh-0.3.3.tar.gz.

File metadata

  • Download URL: pyvegh-0.3.3.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyvegh-0.3.3.tar.gz
Algorithm Hash digest
SHA256 386be518d8407d4df8dbb2ff9e5921af8942ae2b19e3b91f57d66b7be3b4a905
MD5 8407be12eea4bfb88bf531ed1d6734b2
BLAKE2b-256 69c618d099fe04671a2eb8e30b57c952d55091c04b6ea6af10d23ec04bef560b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3.tar.gz:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3800967c4da3df734c97e76e472e81080b8a3eea9e0909ef1629d7c6be0ef7a
MD5 382faa1b641c22a0074275cb0056b961
BLAKE2b-256 c67d61c9450732f1240c6870dfc85e83e5a15a7389ad36f2376e1f41711c889b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pyvegh-0.3.3-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyvegh-0.3.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7ec22b77c9d9579b0968d6c25d0646f12b883864e776a7a14adeea6b3fb50c91
MD5 658fe702f01d95f7d151764f99fe7937
BLAKE2b-256 a3b89f7e2212a639fd068c0b5ed5523eddfb6343e49640bca9c21c5ff5eb68cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-cp38-abi3-win_amd64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 80c60d6c32aea489ac48c6c753ae0aca69a15270720117b4f4c90402b40e7073
MD5 67a207c2068e84bcee08624401fa32dc
BLAKE2b-256 bd63e3020b98474d416b337884e3c76f9ed6b555e0ad97237adc8fee8ef72f68

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 eb81f3f7a705abd86ca87ce1d312198545fb62375851a59dd7b0ad4382ad4c76
MD5 2231f6be71bb628c89d73c6d77a1e397
BLAKE2b-256 602d64e9458e9327395cc583adf7330f63f361d13a96bdb18e30e99f753ea52a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 701d1335c9a06d9216123ae978f5ea4af997a2937de992f686711f7c256d1ea3
MD5 eb51e0db5e39ebe21e06f2b5d04bc793
BLAKE2b-256 55561562123f768e7e5c15d0ad19aaf98c704b085ca36a075a21c3ba2f218f05

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyvegh-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 69a2f0533fa06935d72b9783b4e98e00adefb301855c64d4a51815cdd9ec2feb
MD5 150bc8520ba13e497bcd0569703de4f6
BLAKE2b-256 c35f50a13173dd04023297318d64a7d98e1d89e59dc4d3a35febc149faaa5fdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.3-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on CodeTease/pyvegh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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