Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for directoryhash, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size directoryhash-0.1.1.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page