Skip to main content

Python module to create MD5 files for digital deliveries.

Project description

simd5

Python module to create MD5 files for digital deliveries.

A project of the Digitization Program Office, OCIO, Smithsonian.

https://dpo.si.edu/

Installation

To install:

python3 -m pip install simd5

To upgrade add -U:

python3 -m pip install -U simd5

Usage

To create a MD5 file with the filenames and hashes:

from simd5 import simd5

simd5.md5_file(folder="files", fileformat="m f", no_workers=4)

The command can take these arguments:

  • folder: Which folder to run in. Will ignore subfolders.
  • fileformat: What format to use when creating the MD5 file: ** m f: [MD5 hash] [filename] (space-separated) ** f m: [filename] [MD5 hash] (space-separated) ** m,f: [MD5 hash],[filename] (comma-separated) ** f,m: [filename],[MD5 hash] (comma-separated)
  • no_workers: How many parallel processes to use. By default, it will use the number of cores found in the system.

To verify if the files match a reference md5 file:

from simd5 import simd5

simd5.check_md5_file(md5_file="file.md5", files="*.tif*", csv=True, no_workers=4)

The command can take these arguments:

  • md5_file: The file with the hash and filenames
  • files: A search pattern for which files to compare the hashes
  • csv: Save the results to a results.csv file
  • no_workers: How many parallel processes to use. By default, it will use the number of cores found in the system.

License

Available under the Apache License 2.0. Consult the LICENSE file for details.

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

simd5-0.3.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simd5-0.3.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file simd5-0.3.1.tar.gz.

File metadata

  • Download URL: simd5-0.3.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for simd5-0.3.1.tar.gz
Algorithm Hash digest
SHA256 122d9bfa177ca79c44d8b91e33a58f759359cacb45a0b49c06f9cb1b4573fc61
MD5 9bff2c46c09cbeedbd773125d450d80d
BLAKE2b-256 74a22f0f7dc7221d638d31316fb6b55aa2b4eb3f55996d84404055015c568238

See more details on using hashes here.

File details

Details for the file simd5-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: simd5-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0rc1

File hashes

Hashes for simd5-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f160f0de87f1002c97ec599d33e50de3c28c000c5dc6865ca12d42a0ba5f6c51
MD5 973b7fb24689a80a46f55098887fca52
BLAKE2b-256 c046feb0d85bc1bc14e6066f5892744b317ce629e294c51f5f8febcd40b59527

See more details on using hashes here.

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