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.
Project description
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.
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
directoryhash-0.1.1.tar.gz
(2.2 kB
view details)
File details
Details for the file directoryhash-0.1.1.tar.gz.
File metadata
- Download URL: directoryhash-0.1.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bef9a4547516a133c20f936d32f32d2ace020aa6dbde9fbdd8864feeb1868f3f
|
|
| MD5 |
6646b7d9d9a9b4acbb7c9baab2e4d2e7
|
|
| BLAKE2b-256 |
b4f9b84f590565dd8a5aa434c71297499ad5fc630469ea0b84e8b19647aa1dc1
|