heaje / checksumdir

Simple package to compute a single deterministic hash of the file contents of a directory.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checksumdir

This is a simple module to create a single hash for a directory of files, taking into account only file contents, ignoring any metadata such as file name.

Usage

from checksumdir import dirhash

directory = '/path/to/directory/'
md5hash = dirhash(directory, 'md5')
sha1hash = dirhash(directory, 'sha1')

Or to use the CLI:

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

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

About

Simple package to compute a single deterministic hash of the file contents of a directory.

License:MIT License


Languages

Language:Python 100.0%