file-checksum-1.0.0
توضیحات
Generate and validate checksums for files
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | file-checksum-1.0.0 |
| نام | file-checksum |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Paul Sanders |
| ایمیل نویسنده | paul@pbsdatasolutions.com |
| آدرس صفحه اصلی | https://github.com/pbs-data-solutions/file-checksum |
| آدرس اینترنتی | https://pypi.org/project/file-checksum/ |
| مجوز | MIT |
# File Checksum
[](https://github.com/pbs-data-solutions/file-checksum/actions?query=workflow%3ATesting+branch%3Amain+event%3Apush)
[](https://results.pre-commit.ci/latest/github/pbs-data-solutions/file-checksum/main)
[](https://codecov.io/gh/pbs-data-solutions/file-checksum)
[](https://badge.fury.io/py/file-checksum)
[](https://github.com/pbs-data-solutions/file-checksum)
Generate checksums for files.
CVM requires that submitted data files include a checksum to verify the file has not changed. This
program will generate those checksums for either a single file, or all the files in a directory.
## Installation
Installation with [pipx](https://github.com/pypa/pipx) is recommended.
```sh
pipx install file-checksum
```
Alternatively the program can be installed with pip.
```sh
pip install file-checksum
```
## Usage
### Generate
* Arguments
* checksum_path: Path to the directory or file for which to generate checksums [required]
* Options
* --output-file, -o: Path to the file to same the checksums. Must be a .txt file. If no path is
provided the output will be printed to the screen and not saved. [default: None]
* --checksum-type, -c: The type of checksum to generate. Supported types are md5, sha1, and sha256. [default: sha256]
* --verbose: Provides more output while running
#### Example
If we have the files `my_file_1.xml` and `my_file_2.xml` in the `home/my_files` directory, checksums
can be generated for the files by running:
```sh
checksum /home/my_files -o /home/checksums.txt
```
The will create a file called `checksums.txt` in the `/home` directory containing the following
information (hashes made up for example purposes)
```console
sha256 checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - my_file_1.xml
sha256 checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - my_file_2.xml
```
Subsequent runs pointing to the same output file will append the results to the file so checksums
from different directores can be save to the same file.
نیازمندی
| مقدار | نام |
|---|---|
| ==0.7.0 | typer |
| ==13.3.4 | rich |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl file-checksum-1.0.0:
pip install file-checksum-1.0.0.whl
نصب پکیج tar.gz file-checksum-1.0.0:
pip install file-checksum-1.0.0.tar.gz