Skip to main content

Compute a single hash of the file contents of a directory.

Project description

PyPI - Downloads badge2

A simple module for creating a single hash for a directory of files, with file contents; ignoring any metadata such as file name. Options exist to also exclude specific files or files with specific extensions.

Usage

from checksumdir import dirhash

directory  = '/path/to/directory/'
md5hash    = dirhash(directory, 'md5')
sha1hash   = dirhash(directory, 'sha1', excluded_files=['package.json'])
sha256hash = dirhash(directory, 'sha256', excluded_extensions=['pyc'])

Or to use the CLI:

# Defaults to md5.
$ checksumdir /path/to/directory

# Create sha1 hash:
$ checksumdir -a sha1 /path/to/directory

# Exclude files:
$ checksumdir -e <files> /path/to/directory

# Exclude files with specific extensions:
$ checksumdir -x <extensions> /path/to/directory

# Follow soft links:
$ checksumdir --follow-links /path/to/directory

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

checksumdir-1.3.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

checksumdir-1.3.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file checksumdir-1.3.0.tar.gz.

File metadata

  • Download URL: checksumdir-1.3.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.6 Linux/6.11.0-1018-azure

File hashes

Hashes for checksumdir-1.3.0.tar.gz
Algorithm Hash digest
SHA256 11693641be49defbfdfb13612a7fd70ce1acd5401db74105f8c486fd72046540
MD5 f27e2d1d105b08f6a63efcb2c543220b
BLAKE2b-256 c4cb854df78940f24f099b2e2877dd4f32b9cae0c6bba3f2854bc6fc91ed5c6a

See more details on using hashes here.

File details

Details for the file checksumdir-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: checksumdir-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.6 Linux/6.11.0-1018-azure

File hashes

Hashes for checksumdir-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29fd52a6258218752a3d8d2d7c998c6aca5d40dc6828fe1f7e98c631745da098
MD5 c91a896f652103f047525b47a3bae09b
BLAKE2b-256 352e9b839f7f358f7fb26b9eba9214f7bdd592934d3707c564cecf842f2e8d82

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