Skip to main content

Simple python tool to hash dictionaries using both default hash and sha256.

Project description

travis sonar_quality sonar_maintainability sonar_coverage coveralls_coverage pip

Simple python tool to hash dictionaries using both default hash and sha256.

How do I install this package?

As usual, just download it using pip:

pip install dict_hash

Usage examples

The package offers two functions: sha256 to generate constant sha256 hashes and dict_hash, to generate hashes using the native hash function.

dict_hash

from dict_hash import dict_hash
from random_dict import random_dict
from random import randint

d = random_dict(randint(1, 10), randint(1, 10))
my_hash = dict_hash(d)

sha256

from dict_hash import sha256
from random_dict import random_dict
from random import randint

d = random_dict(randint(1, 10), randint(1, 10))
my_hash = sha256(d)

Project details


Download files

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

Source Distribution

dict_hash-1.0.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page