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

# 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.snap

4. Inspect & Verify

Check file integrity (Blake3) and view embedded metadata.

vegh check backup.snap

5. Restore

Restore the snapshot to a target directory.

vegh restore backup.snap ./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.snap --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.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")

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.2.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.2-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.2-cp38-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8+Windows x86-64

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

Uploaded CPython 3.8+macOS 11.0+ ARM64

pyvegh-0.3.2-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.2.tar.gz.

File metadata

  • Download URL: pyvegh-0.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 af094e22abb1fd972fe42abe6cf554a696b3962d8330b2484c906826d9c81f59
MD5 935de7914a4bd405b9e6f3fd6529ca04
BLAKE2b-256 aa5c35ba34605fe043c66d72a6a9d6e3a8b83b664130c167892e44c5d6b089f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyvegh-0.3.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3f64cfa9ff7cd4b7ca24c107333684eeaeeac30aa5795386c9df8e70d8e988b
MD5 37b5ad750302f026b688d7e2f4385337
BLAKE2b-256 a44ca3b2e3fb90bdc9fb0bd6a97faefa17ebf85ceca0128de28b443ea3c0d571

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pyvegh-0.3.2-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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4d0dd9729af2f09810c1fe820f1eda6080c91e1f660ec0d15c2de45e84dc2c7b
MD5 7438668155c850b084e88fc8fd243e2a
BLAKE2b-256 c1bd66fc91db6d7f25a300de7bab5ff92bd8081c75c2c01083e0c4593361fa76

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyvegh-0.3.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c022413605d964818bad9db030b13a81ad34d678886683eaf89bc0a67f975062
MD5 0132e78d02ac1e40bf6fadac81080a50
BLAKE2b-256 07e815ec93e8fdbed1afd53d7ffacb4028031d385a92eb99da62809b18111419

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyvegh-0.3.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5b640bbedc878709561438c4cf79f93bc31b38610aa3497ba8b6ecc41cf94920
MD5 6e059b0e6e6a91b7c5d67a808e3c613a
BLAKE2b-256 c17a2c4b9d2d5f477dde291b11e975573b16c9beaf8dd4a3b8ef0c438896c2dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyvegh-0.3.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bdc7b11d89059ef39ba90de1393add87a3d382df9036b44f6857f2ab0155c05a
MD5 31afe69d44707b884da8fa09c9043125
BLAKE2b-256 2a31a8be10b002e345d4713a04eb9d75c52f6a2f8134b0434543216298779c31

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyvegh-0.3.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3f926be38211c2b8053595dc9b00f58a92a87e851ddab91c0f7480ec2cd5335a
MD5 62c6ca29e53a4a950554376276bfa160
BLAKE2b-256 9ab2b67c8a5c6e4f1d434601079ff1065d10de96b8b2c8255d76a6bf0f7b61c3

See more details on using hashes here.

Provenance

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