Skip to main content

Generate portable md5 hashes from (arbitrarily nested) dictionaries.

Project description

dicthash

Generate portable md5 hashes from (arbitrarily nested) dictionaries. These dictionaries can contain arbitrary Python and NumPy data types. The goal of the module is to provide a hash function that can be safely used across different platforms. Its main use is to generate unique identifiers for parameter dictionaries used in parameter scans of neural network simulations.

It exposes a single function to the user dicthash.generate_hash_from_dict.

It exposes a single function to the user: generate_hash_from_dict. The user can set two global parameters:

  • FLOAT_FACTOR

    To ensure consistency between different systems, the library multiplies floats with the FLOAT_FACTOR and then converts them to integers.

  • FLOOR_SMALL_FLOATS

    If the float is smaller than the inverse of the FLOAT_FACTOR, it cannot be safely converted. If FLOOR_SMALL_FLOATS is set to True, the library will round the float to zero. If set to False, it will throw an error in this case.

Python2.7 Python3.6 PyPI version fury.io GPL license

Code status

Build Status Coverage Status

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

dicthash-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicthash-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file dicthash-0.0.2.tar.gz.

File metadata

  • Download URL: dicthash-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dicthash-0.0.2.tar.gz
Algorithm Hash digest
SHA256 30b71bd64101295053b082b3244870e6ca7dca561bdb8f3776c42c8c40cb4af4
MD5 91ae9ada6ea243e23637e6084883c2dc
BLAKE2b-256 99414e8b11ac5c13cbb6f7f0f7a2792ffe24d0571b091ebc2eb94c68cdd76c5c

See more details on using hashes here.

File details

Details for the file dicthash-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dicthash-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 84f9f6bd521d5c0a8a1b4eda4688634958d80a7e8d34c2a6c9a7f37ef0084281
MD5 eae592fc9fa11e542c03dc0ef71835b2
BLAKE2b-256 98746a2fa58978384bd188ecca481079aa2bdd8d56f9f0facf8a8ebf9add162c

See more details on using hashes here.

Supported by

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