Skip to main content

DirectoryHash

DirectoryHash is a library for Python. It gives an opportunity to get a hash of the destination folder. You can choose file types, which will participate in the calculations.

Github repo

Installation

Install using pip:

pip install directoryhash

…or clone the project from github:

https://github.com/san4ezy/directoryhash.git

How to use?

Getting hash for whole directory:

from directoryhash import md5, sha1

md5_hash = md5("path_to_directory")
sha1_hash = sha1("path_to_directory")

Getting hash for directory including html and css only:

from directoryhash import md5, sha1

filetypes = ('.html', '.css',)

md5_hash = md5("path_to_directory", filetypes)
sha1_hash = sha1("path_to_directory", filetypes)

Catching exceptions:

from directoryhash import md5, HashedDirectoryDoesNotExist

directory_path = "path_to_destination_folder"
try:
    md5(directory_path)
except HashedDirectoryDoesNotExist as e:
    print(e)

Metadata

Release files for directoryhash 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for directoryhash 0.1.1
File Size Uploaded Provenance Actions
directoryhash-0.1.1.tar.gz 2.2 kB Without provenance Details for directoryhash-0.1.1.tar.gz

Release files / directoryhash-0.1.1.tar.gz

Download URL directoryhash-0.1.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bef9a4547516a133c20f936d32f32d2ace020aa6dbde9fbdd8864feeb1868f3f
BLAKE2b-256 checksum
How to use checksums
b4f9b84f590565dd8a5aa434c71297499ad5fc630469ea0b84e8b19647aa1dc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for directoryhash 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page