The tool provides methods to calculate ETags for Objects on AWS S3, and also md5s, on local objects. It also allows to check the integrity of files, both locally and on AWS S3.
Project description
Compute ETags and MD5s
The tool provides methods to calculate ETags for Objects on AWS S3, and also md5s, on local objects. It also allows comparing ETags or md5s to check the integrity of files, both locally and on AWS S3, given a list of files and their calculated ETags.
Installation
pip install compETAG
Usage
The following example will compute ETags for local files with the same chunk size used by AWS on S3:
compute_etags -i <file1> <file2> .... -m etag -s 8MB -o out.txt
Chunk size can be set to any desired value:
compute_etags -i <file1> <file2> .... -m etag -s 1GB
With mode fixed at md5
, the resulting calculation will be md5 hashes:
compute_etags -i <file1> <file2> .... -m md5
To retrieve ETags from objects on AWS S3, setting mode to s3uri
will redirect the tool to AWS S3, provided a bucket/s, key/s, and pattern/s (optional):
compute_etags -m s3uri -b <bucket1> <bucket2> .. -k <key1> <key2> .. -p <pattern1> <pattern2> ..
To check the integrity of local files or AWS S3 objects, the following will calculate or retrieve ETags or md5s on the list of files provided in a text file, and compare the results to the provided hashings. Each row in the input text file represents a pair of ETag/md5 hash and a file name.
-
Checking ETags of local files:
compute_etags -c <input.txt> -m etags
-
Checking md5s of local files:
compute_etags -c <input.txt> -m md5
-
Checking ETags of AWS S3 objects:
compute_etags -c <input.txt> -m s3uri -b <bucket1> <bucket2> .. -k <key1> <key2> ..
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file compETAG-0.0.3.tar.gz
.
File metadata
- Download URL: compETAG-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8ee0ab092811ef73ff77daaedb2e4fe5823a44ce42fa4190b2df28e21f21570 |
|
MD5 | 3cdf24df4aa0eb97b83446acee84657b |
|
BLAKE2b-256 | b03aa8276381aa21ce13755bcb264a0d90f71875eb15aceb32d2f6b8744255e5 |
File details
Details for the file compETAG-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: compETAG-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c17590edf405aa6ae5055c8ed38cf605a56a59be24af0955e4b74966ff58ebc |
|
MD5 | 308372c33bc42094eb8af77eac4eb81c |
|
BLAKE2b-256 | 1fd3ba2d4e31c616dc7b3d9ad45eb606325e2c7a82b277bcf70c07179c6d10c3 |