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
Metadata
Release files for checksumdir 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| checksumdir-1.3.0.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| checksumdir-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / checksumdir-1.3.0.tar.gz
| Download URL | checksumdir-1.3.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11693641be49defbfdfb13612a7fd70ce1acd5401db74105f8c486fd72046540
|
|
BLAKE2b-256 checksum How to use checksums |
c4cb854df78940f24f099b2e2877dd4f32b9cae0c6bba3f2854bc6fc91ed5c6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Linux/6.11.0-1018-azure
|
Release files / checksumdir-1.3.0-py3-none-any.whl
| Download URL | checksumdir-1.3.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29fd52a6258218752a3d8d2d7c998c6aca5d40dc6828fe1f7e98c631745da098
|
|
BLAKE2b-256 checksum How to use checksums |
352e9b839f7f358f7fb26b9eba9214f7bdd592934d3707c564cecf842f2e8d82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.13.6 Linux/6.11.0-1018-azure
|