vrfy


Namevrfy JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/BumblebeeMan/vrfy
SummaryVerify with VRFY: Ensure the integrity of your file copies, hash by hash!
upload_time2024-04-05 16:29:20
maintainerNone
docs_urlNone
authorBumblebeeMan (Dennis Koerner)
requires_python>=3.7
licenseNone
keywords vrfy verify check directory hash
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Verify with VRFY: Ensure the integrity of your file copies, hash by hash!

When beginning to explore cloud storage (or other methods of remotely storing files), one may become concerned about file integrity at some point. When dealing with a large number of individual files, how can one be certain that no file becomes corrupted during the storage process, and that downloaded files remain identical to their uploaded versions? This concern is particularly relevant after undergoing multiple segmentation and encryption/decryption processes. It's impractical to manually verify all files, making file corruption a common worry, especially for those using smaller cloud providers. 

Those concerns are mitigated by using a small console application called **vrfy**. **vrfy** handles the heavy lifting and verifies the integrity of your backups for you!
With a single, easy command, you can:

1. Verify that copies are identical (i.e., all files are included in both locations, and -by using sha256 hash checksums- that not even a single bit was changed).
2. Create and store a file with sha256 hash checksums beside your data. This file can be backed up with your data and used for verification later.
3. Verify that your data is unchanged using the checksum file.

## Installation
### PIP: 
Install **vrfy** using pip:
```bash
pip install vrfy --user
```
 
## Usage the CLI
### 1. Verifing that two directories are identical
Verifing that the contents of '/path/of/backup' are identical to those of '/path/of/master'. For example, '/path/of/master' might be a local backup, whereas '/path/of/backup' might be loaded from cloud storage.
```bash
vrfy -m /path/of/master -b /path/of/backup -r
```
or (mismatched checksums are printed to console)
```bash
vrfy -m /path/of/master -b /path/of/backup -r -p
```

### 2. Storing checksums for future verification
Creating a file that lists checksums for all files within a directory:
```bash
vrfy -c /path/of/data
```
Using **-r** (recursive) all in sub-directories as well:
```bash
vrfy -r -c /path/of/data
```

### 3. Verifing files against stored checksums
Verifying that all files within a directory haven't been changed (i.e., their checksums still match):
```bash
vrfy -v /path/of/data
```
Using option **-r** (recursive) all sub-directories are verified as well:
```bash
vrfy -r -v /path/of/data
```
Using option **-p** (print) all mismatched checksums are printed to console for further inspection:
```bash
vrfy -p -r -v /path/of/data
```
Verifying the current working directory and all its sub-directories:
```bash
vrfy
```
Verifying file against an expected checksum:
```bash
vrfy -f /path/of/file/filename -cs expectedChecksum
```
Where "expectedChecksum" can be one of the following:
- A string containing the expected sha256 hash digest.
- A *.sha256sum-file that includes the expected hash digest.
- A sums.csv-file created by **vrfy** that includes the expected hash digest.

### 4. Other CLI options
Display version of vrfy:
```bash
vrfy --version
```
Display checksum for given file:
```bash
vrfy -p -f /path/of/file/filename
```
Display help:
```bash
vrfy -h
```

## Using the python package
### Getting started
```python
from vrfy.vrfy import vrfy
vf = vrfy()

# Get version string
versionStr = vf.GetVersion()

# Verify a single file to an expected checksum
Result = vf.VerifyFile("/path/and/fileName.xyz", "expectedChecksum")

# Verify contents of a directory to stored checksums
Result = VerifyFilesAgainstChecksums("path/to/directory")

# Create/store checksum file for later file verification
Result = WriteChecksumFile("path/to/directory")

# Verify that files within master and backup directories are identical
Result = VerifyFiles("path/to/directory/master", "path/to/directory/backup")
```
where
```python
class Result:
    self.Result: bool            # Determines whether operation was successful (True) or not (False).
    self.Path: str               # Path the result object corresponds to. 
    self.PathError: bool         # True: Path is a valid directory, False otherwise.
    self.MissingFiles: list      # Missing files in (backup) directory that are included in master directory / checksum list.
    self.AdditionalFiles: list   # Additional files in (backup) directory that are NOT included in master directory / checksum list.
    self.ChecksumMismatch: list  # List of files with mismachting checksums.
    self.MasterChecksums: dict   # Dictionary of files within master directory and their checksums.
    self.BackupChecksums: dict   # Dictionary of files within backup directory and their checksums.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BumblebeeMan/vrfy",
    "name": "vrfy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "vrfy, verify, check, directory, hash",
    "author": "BumblebeeMan (Dennis Koerner)",
    "author_email": "dennis@bumblebeeman.dev",
    "download_url": "https://files.pythonhosted.org/packages/47/91/627db52db0406c32fa0cd4bdd72c9ef4cda7444063c400e27101dcbfb5f8/vrfy-0.4.0.tar.gz",
    "platform": null,
    "description": "\ufeff# Verify with VRFY: Ensure the integrity of your file copies, hash by hash!\n\nWhen beginning to explore cloud storage (or other methods of remotely storing files), one may become concerned about file integrity at some point. When dealing with a large number of individual files, how can one be certain that no file becomes corrupted during the storage process, and that downloaded files remain identical to their uploaded versions? This concern is particularly relevant after undergoing multiple segmentation and encryption/decryption processes. It's impractical to manually verify all files, making file corruption a common worry, especially for those using smaller cloud providers. \n\nThose concerns are mitigated by using a small console application called **vrfy**. **vrfy** handles the heavy lifting and verifies the integrity of your backups for you!\nWith a single, easy command, you can:\n\n1. Verify that copies are identical (i.e., all files are included in both locations, and -by using sha256 hash checksums- that not even a single bit was changed).\n2. Create and store a file with sha256 hash checksums beside your data. This file can be backed up with your data and used for verification later.\n3. Verify that your data is unchanged using the checksum file.\n\n## Installation\n### PIP: \nInstall **vrfy** using pip:\n```bash\npip install vrfy --user\n```\n \n## Usage the CLI\n### 1. Verifing that two directories are identical\nVerifing that the contents of '/path/of/backup' are identical to those of '/path/of/master'. For example, '/path/of/master' might be a local backup, whereas '/path/of/backup' might be loaded from cloud storage.\n```bash\nvrfy -m /path/of/master -b /path/of/backup -r\n```\nor (mismatched checksums are printed to console)\n```bash\nvrfy -m /path/of/master -b /path/of/backup -r -p\n```\n\n### 2. Storing checksums for future verification\nCreating a file that lists checksums for all files within a directory:\n```bash\nvrfy -c /path/of/data\n```\nUsing **-r** (recursive) all in sub-directories as well:\n```bash\nvrfy -r -c /path/of/data\n```\n\n### 3. Verifing files against stored checksums\nVerifying that all files within a directory haven't been changed (i.e., their checksums still match):\n```bash\nvrfy -v /path/of/data\n```\nUsing option **-r** (recursive) all sub-directories are verified as well:\n```bash\nvrfy -r -v /path/of/data\n```\nUsing option **-p** (print) all mismatched checksums are printed to console for further inspection:\n```bash\nvrfy -p -r -v /path/of/data\n```\nVerifying the current working directory and all its sub-directories:\n```bash\nvrfy\n```\nVerifying file against an expected checksum:\n```bash\nvrfy -f /path/of/file/filename -cs expectedChecksum\n```\nWhere \"expectedChecksum\" can be one of the following:\n- A string containing the expected sha256 hash digest.\n- A *.sha256sum-file that includes the expected hash digest.\n- A sums.csv-file created by **vrfy** that includes the expected hash digest.\n\n### 4. Other CLI options\nDisplay version of vrfy:\n```bash\nvrfy --version\n```\nDisplay checksum for given file:\n```bash\nvrfy -p -f /path/of/file/filename\n```\nDisplay help:\n```bash\nvrfy -h\n```\n\n## Using the python package\n### Getting started\n```python\nfrom vrfy.vrfy import vrfy\nvf = vrfy()\n\n# Get version string\nversionStr = vf.GetVersion()\n\n# Verify a single file to an expected checksum\nResult = vf.VerifyFile(\"/path/and/fileName.xyz\", \"expectedChecksum\")\n\n# Verify contents of a directory to stored checksums\nResult = VerifyFilesAgainstChecksums(\"path/to/directory\")\n\n# Create/store checksum file for later file verification\nResult = WriteChecksumFile(\"path/to/directory\")\n\n# Verify that files within master and backup directories are identical\nResult = VerifyFiles(\"path/to/directory/master\", \"path/to/directory/backup\")\n```\nwhere\n```python\nclass Result:\n    self.Result: bool            # Determines whether operation was successful (True) or not (False).\n    self.Path: str               # Path the result object corresponds to. \n    self.PathError: bool         # True: Path is a valid directory, False otherwise.\n    self.MissingFiles: list      # Missing files in (backup) directory that are included in master directory / checksum list.\n    self.AdditionalFiles: list   # Additional files in (backup) directory that are NOT included in master directory / checksum list.\n    self.ChecksumMismatch: list  # List of files with mismachting checksums.\n    self.MasterChecksums: dict   # Dictionary of files within master directory and their checksums.\n    self.BackupChecksums: dict   # Dictionary of files within backup directory and their checksums.\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Verify with VRFY: Ensure the integrity of your file copies, hash by hash!",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/BumblebeeMan/vrfy"
    },
    "split_keywords": [
        "vrfy",
        " verify",
        " check",
        " directory",
        " hash"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "510979e16dea297356a548a1c1c2353540c924786e3e54f94a23a70d7525936a",
                "md5": "34d07e3ac887ebaff0ef7658c1e81cf8",
                "sha256": "5498fbcb2c66b9297822477ee69e4e891000d729a7efb11145e02039c2fcfebd"
            },
            "downloads": -1,
            "filename": "vrfy-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "34d07e3ac887ebaff0ef7658c1e81cf8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 22499,
            "upload_time": "2024-04-05T16:29:18",
            "upload_time_iso_8601": "2024-04-05T16:29:18.379008Z",
            "url": "https://files.pythonhosted.org/packages/51/09/79e16dea297356a548a1c1c2353540c924786e3e54f94a23a70d7525936a/vrfy-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4791627db52db0406c32fa0cd4bdd72c9ef4cda7444063c400e27101dcbfb5f8",
                "md5": "f829e36063c9cb0888f1e60498e97abf",
                "sha256": "d0d69bec324469cffc0a994c61c1825231f3e2e86975536b7b71168ee6b5a10f"
            },
            "downloads": -1,
            "filename": "vrfy-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f829e36063c9cb0888f1e60498e97abf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 23253,
            "upload_time": "2024-04-05T16:29:20",
            "upload_time_iso_8601": "2024-04-05T16:29:20.124995Z",
            "url": "https://files.pythonhosted.org/packages/47/91/627db52db0406c32fa0cd4bdd72c9ef4cda7444063c400e27101dcbfb5f8/vrfy-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 16:29:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BumblebeeMan",
    "github_project": "vrfy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vrfy"
}
        
Elapsed time: 3.31856s