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.4.tar.gz (28.4 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.4-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.4-cp38-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.8+Windows x86-64

pyvegh-0.3.4-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.4-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.4-cp38-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

pyvegh-0.3.4-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.4.tar.gz.

File metadata

  • Download URL: pyvegh-0.3.4.tar.gz
  • Upload date:
  • Size: 28.4 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.4.tar.gz
Algorithm Hash digest
SHA256 e857563d17732fc641a67fa31e2497314138e459a59e1daf1251fb5035498771
MD5 69bfcc7c19ef735527084cbff4e8406a
BLAKE2b-256 72b020ec63ddbc2e0a2806fc9bcdc9da8f96990500948ba5c3b88c6fc674e4ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4.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.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49b21b850711c6f606598fef394c1a8fc3544edbad3223ed1cb5ca2fc073d4ef
MD5 73110576ad6f44b4783ee44da7595fea
BLAKE2b-256 2d98c06b9912d703fcf201c32b95e9660ed6a4c2d27c614c156c78dfb2320a48

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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.4-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pyvegh-0.3.4-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.2 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.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3da99eb31c9efd7168c3b71da82cabf4ccdcc4612deb417d455568d3292987e7
MD5 0af073688a90e23a80eba7387457b9dc
BLAKE2b-256 73c1b06c366a109233ba7b844bf9eb415b7edd43694363d606099fc712cf5e0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9a9cf3cd7cf7f7d7bf2f19bdb0209e4c08473335dcf0ca2ba576cc3e2cac5e60
MD5 937d9f0f90d3dedd9ec7b0dd6939b007
BLAKE2b-256 f3637036acd8a813cdb068431c8e94f8e663e426db70f91faa467ebd2707e855

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 37b87a880a1b59443c5d2fd5e03e42371f4c4739b9c9eecc23f95f8474546cc4
MD5 0666416943b3c27a73e9ebf82349570e
BLAKE2b-256 06e55481779efbe838e4643bcd040e88e84bad4a0c8eb130e72ce7dba855e175

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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.4-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d50502493f72183e89bae3d0d7daf560a5ffb5571f288c1927f8807fe87c8535
MD5 0a4df7dbc0d3b6e9a3f7bb9d2bd7ef42
BLAKE2b-256 96f8258e98306de711f62c800dc21c13bf890bd73d3e916f467ba1fe6a2bb468

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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.4-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyvegh-0.3.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 70521e5fac18958f1e833325fe9a2e098ba72f728397e7f6ab14836d84b64915
MD5 b07d8ae36911308bf9a31e4031ad6700
BLAKE2b-256 958bf508e9e5c8652185f7676d93bd06f3d01bbd0494bc797d37ebafe658b05a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvegh-0.3.4-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