Skip to main content

Calculate directory hash

Project description

Directory Hash Calculator

This project is a super simple Python library which can be used in both command line and library ways.

To install it:

$ pip install dirhashcalc

Commandline Usage

To use it in commandline:

$ dirhashcalc path/to/dir
8907645cfe42941cf7dbc656d59ccc4f02ec2a16493c097e04ce2547ad1e5484

You can also pass mlutiple arguments:

$ dirhashcalc first second
first: 8907645cfe42941cf7dbc656d59ccc4f02ec2a16493c097e04ce2547ad1e5484
second: 9f29e53d60a5a8e92da03e41678374ac584c2c94a24898c0c719736412723c4d

Also there are some options that you can use:

$ dirhashcalc --version # shows version of the tool

# verbose output (prints name of each file when calculating hash of it)
$ dirhashcalc some/dir -v
$ dirhashcalc some/dir --verbose

# super verbose output (prints file names and hash of each one of them)
$ dirhashcalc some/dir -vv
$ dirhashcalc some/dir --super-verbose

Library Usage

You can use this project in your own projects to calculate directory hash.

from dirhashcalc import DirHashCalculator

dir_sha256 = DirHashCalculator('path/to/dir').calc()

Class DirHashCalculator has more methods. To see them and use it in any other way that you want, see content of dir_hash.py in the project and read description of each method in docstring.

License

This project is licensed under 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

dirhashcalc-0.0.1.dev4.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

dirhashcalc-0.0.1.dev4-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dirhashcalc-0.0.1.dev4.tar.gz.

File metadata

  • Download URL: dirhashcalc-0.0.1.dev4.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for dirhashcalc-0.0.1.dev4.tar.gz
Algorithm Hash digest
SHA256 a3b1077a4ae8afde9e4b976ac7fea094bdb683d6021253cb68d8a80fb9f69d28
MD5 7fe68903da812478a54a105d95b747c1
BLAKE2b-256 fef7afc1cd4ccd70cce783c688dc751c5a4536d8b5381d1bb58b2eb1e499803c

See more details on using hashes here.

File details

Details for the file dirhashcalc-0.0.1.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for dirhashcalc-0.0.1.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 de56b2b5639b64e6c354cb284af570f9ff13e760e24733ab8e874f7877dc8194
MD5 e30f3e85e1322c9a76f7630e81f75711
BLAKE2b-256 7c8fd27efed6d239e1644cb3e9273786d47a98fa1364be8112acaa7a6e8104fb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page