dict_hash
=========================================================================================
|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:

.. code:: shell

    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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python

    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)



.. |travis| image:: https://travis-ci.org/LucaCappelletti94/dict_hash.png
   :target: https://travis-ci.org/LucaCappelletti94/dict_hash

.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_dict_hash&metric=alert_status
    :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_dict_hash

.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_dict_hash&metric=sqale_rating
    :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_dict_hash

.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_dict_hash&metric=coverage
    :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_dict_hash

.. |coveralls_coverage| image:: https://coveralls.io/repos/github/LucaCappelletti94/dict_hash/badge.svg?branch=master
    :target: https://coveralls.io/github/LucaCappelletti94/dict_hash?branch=master

.. |pip| image:: https://badge.fury.io/py/dict_hash.svg
    :target: https://badge.fury.io/py/dict_hash


