From 293cf23698a3ce9bec4f44145f0e76f1d79592f5 Mon Sep 17 00:00:00 2001 From: Eugene Scherba Date: Wed, 29 Dec 2021 02:06:43 -0800 Subject: [PATCH] update readme --- README.rst | 12 +++++++++--- pip-freeze.txt | 20 +++++--------------- setup.py | 2 +- src/metrohash.cpp | 22 +++++++++++----------- src/metrohash.pyx | 2 +- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/README.rst b/README.rst index 30d656d..bee06c7 100644 --- a/README.rst +++ b/README.rst @@ -28,8 +28,11 @@ To use this package in your program, simply type After that, you should be able to import the module and do things with it (see Example Usage below). -Example Usage -------------- +Usage Examples +-------------- + +Simple Hashing +~~~~~~~~~~~~~~ This package provides Python interfaces to 64- and 128-bit implementations of MetroHash algorithm. For stateless hashing, it exports ``metrohash64`` and @@ -46,6 +49,9 @@ unicode) and an optional ``seed`` parameter: 182995299641628952910564950850867298725 +Incremental Hashing +~~~~~~~~~~~~~~~~~~~ + For incremental hashing, use ``MetroHash64`` and ``MetroHash128`` classes. Incremental hashing is associative and guarantees that any combination of input slices will result in the same final hash value. This is useful for processing @@ -69,7 +75,7 @@ Note that the resulting hash value above is the same as in: 7851180100622203313 Buffer Protocol Support ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~ The methods in this module support Python `Buffer Protocol `__, which allows them to be used diff --git a/pip-freeze.txt b/pip-freeze.txt index 030856a..a00d64c 100644 --- a/pip-freeze.txt +++ b/pip-freeze.txt @@ -1,29 +1,19 @@ attrs==21.3.0 -backcall==0.2.0 Cython==0.29.26 -decorator==5.1.0 distlib==0.3.4 filelock==3.4.2 +importlib-metadata==4.10.0 iniconfig==1.1.1 -ipython==7.30.1 -jedi==0.18.1 -matplotlib-inline==0.1.3 --e git+https://github.com/escherba/python-metrohash@d3f96245c18e7e3724b8e8c8c211ff5c524beed0#egg=metrohash +-e git+https://github.com/escherba/python-metrohash@5b2b36b09262853950816ff3852ebda5a8c2779c#egg=metrohash numpy==1.21.5 packaging==21.3 -parso==0.8.3 -pexpect==4.8.0 -pickleshare==0.7.5 platformdirs==2.4.1 pluggy==1.0.0 -prompt-toolkit==3.0.24 -ptyprocess==0.7.0 py==1.11.0 -Pygments==2.10.0 pyparsing==3.0.6 pytest==6.2.5 six==1.16.0 toml==0.10.2 -traitlets==5.1.1 -virtualenv==20.11.0 -wcwidth==0.2.5 +typing_extensions==4.0.1 +virtualenv==20.11.1 +zipp==3.6.0 diff --git a/setup.py b/setup.py index 45cda1a..62defbf 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ def is_pure(self): ) -VERSION = '0.1.0.post0' +VERSION = '0.1.0.post1' URL = "https://github.com/escherba/python-metrohash" diff --git a/src/metrohash.cpp b/src/metrohash.cpp index df447e1..284a16c 100644 --- a/src/metrohash.cpp +++ b/src/metrohash.cpp @@ -906,9 +906,9 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { "src/metrohash.pyx", "stringsource", - "env/lib/python3.8/site-packages/Cython/Includes/cpython/type.pxd", - "env/lib/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", - "env/lib/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", + "env/lib/python3.7/site-packages/Cython/Includes/cpython/type.pxd", + "env/lib/python3.7/site-packages/Cython/Includes/cpython/bool.pxd", + "env/lib/python3.7/site-packages/Cython/Includes/cpython/complex.pxd", }; /*--- Type declarations ---*/ @@ -1400,7 +1400,7 @@ static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_basestring[] = "basestring"; -static const char __pyx_k_0_1_0_post0[] = "0.1.0.post0"; +static const char __pyx_k_0_1_0_post1[] = "0.1.0.post1"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_MetroHash64[] = "MetroHash64"; static const char __pyx_k_metrohash64[] = "metrohash64"; @@ -1415,7 +1415,7 @@ static const char __pyx_k_escherba_metrohash_gmail_com[] = "escherba+metrohash@g static const char __pyx_k_Python_wrapper_for_MetroHash_a[] = "\nPython wrapper for MetroHash, a fast non-cryptographic hashing algorithm\n"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static PyObject *__pyx_kp_u_; -static PyObject *__pyx_kp_u_0_1_0_post0; +static PyObject *__pyx_kp_u_0_1_0_post1; static PyObject *__pyx_kp_u_Argument; static PyObject *__pyx_kp_u_Eugene_Scherba; static PyObject *__pyx_n_s_MemoryError; @@ -4011,7 +4011,7 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0}, - {&__pyx_kp_u_0_1_0_post0, __pyx_k_0_1_0_post0, sizeof(__pyx_k_0_1_0_post0), 0, 1, 0, 0}, + {&__pyx_kp_u_0_1_0_post1, __pyx_k_0_1_0_post1, sizeof(__pyx_k_0_1_0_post1), 0, 1, 0, 0}, {&__pyx_kp_u_Argument, __pyx_k_Argument, sizeof(__pyx_k_Argument), 0, 1, 0, 0}, {&__pyx_kp_u_Eugene_Scherba, __pyx_k_Eugene_Scherba, sizeof(__pyx_k_Eugene_Scherba), 0, 1, 0, 0}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, @@ -4436,7 +4436,7 @@ if (!__Pyx_RefNanny) { * * __author__ = "Eugene Scherba" # <<<<<<<<<<<<<< * __email__ = "escherba+metrohash@gmail.com" - * __version__ = "0.1.0.post0" + * __version__ = "0.1.0.post1" */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_kp_u_Eugene_Scherba) < 0) __PYX_ERR(0, 9, __pyx_L1_error) @@ -4444,7 +4444,7 @@ if (!__Pyx_RefNanny) { * * __author__ = "Eugene Scherba" * __email__ = "escherba+metrohash@gmail.com" # <<<<<<<<<<<<<< - * __version__ = "0.1.0.post0" + * __version__ = "0.1.0.post1" * __all__ = [ */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_email, __pyx_kp_u_escherba_metrohash_gmail_com) < 0) __PYX_ERR(0, 10, __pyx_L1_error) @@ -4452,15 +4452,15 @@ if (!__Pyx_RefNanny) { /* "metrohash.pyx":11 * __author__ = "Eugene Scherba" * __email__ = "escherba+metrohash@gmail.com" - * __version__ = "0.1.0.post0" # <<<<<<<<<<<<<< + * __version__ = "0.1.0.post1" # <<<<<<<<<<<<<< * __all__ = [ * "metrohash64", */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_1_0_post0) < 0) __PYX_ERR(0, 11, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_version, __pyx_kp_u_0_1_0_post1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) /* "metrohash.pyx":12 * __email__ = "escherba+metrohash@gmail.com" - * __version__ = "0.1.0.post0" + * __version__ = "0.1.0.post1" * __all__ = [ # <<<<<<<<<<<<<< * "metrohash64", * "metrohash128", diff --git a/src/metrohash.pyx b/src/metrohash.pyx index a532163..4da01af 100644 --- a/src/metrohash.pyx +++ b/src/metrohash.pyx @@ -8,7 +8,7 @@ Python wrapper for MetroHash, a fast non-cryptographic hashing algorithm __author__ = "Eugene Scherba" __email__ = "escherba+metrohash@gmail.com" -__version__ = "0.1.0.post0" +__version__ = "0.1.0.post1" __all__ = [ "metrohash64", "metrohash128",