Hashing Python code
Project description
Codehash
Installing
Install and update using Pip.
pip install -U codehash
A simple example
from codehash import hash_function
dct = {'a': 1}
def f(x):
return 1 + dct["param"]
h1 = hash_function(f)
def f(x):
"""Docstring."""
return 1 + dct["param"] # comment
h2 = hash_function(f)
dct = {'a': 2}
def f(x):
return 1 + dct["param"]
h3 = hash_function(f)
assert h1 == h2
assert h1 != h3
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
codehash-0.1.0.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file codehash-0.1.0.tar.gz
.
File metadata
- Download URL: codehash-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1232e80c100c47a7f644a6652ba3514c3f2fb8c7e6a06f2a2a8684d2a445792 |
|
MD5 | 2836b1053f4703d6c390262c021024ec |
|
BLAKE2b-256 | 7650d111c463629e9dedada948dc60dcb94bdc8177a56bbf0350755c48513055 |
File details
Details for the file codehash-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: codehash-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.2 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f83bd2f09e378dac2dfd4752fc08ad457335bcc6d54c261d6e09ce0ac0d7a93c |
|
MD5 | 0cecb3183ba4def49cd6c1144497b7d3 |
|
BLAKE2b-256 | 635f74c1c7492402e1000b1c22a88fc90ce8ac7180e84b0188215b1a019f1078 |