Implementation of the Jump Consistent Hash algorithm
Project description
Jump Consistent Hash
Python and C implementation of the jump consistent hash algorithm by John Lamping and Eric Veach[1]. Tested on Python 2.7 and 3.5+.
Install
To install Jump Consistent Hash, simply run this simple command in your terminal of choice:
$ pip install jump-consistent-hash
The C implementation is optional but is about 10x faster than the pure Python implementation in CPython.
Usage
>>> import jump
>>> jump.hash(256, 1024)
520
If you want to use a str as a key instead of an int, you can pass it through a hash function to compute a real key. Here’s a couple of examples using Python 3:
>>> import hashlib
>>> int(hashlib.md5(b'127.0.0.1').hexdigest(), 16)
325870950296970981340734819828239218902
>>> int(hashlib.sha1(b"127.0.0.1").hexdigest(), 16)
431133456357828263809343936597625557575256328153
>>> import binascii
>>> binascii.crc32(b'127.0.0.1') & 0xffffffff
3619153832
>>> abs(hash('127.0.0.1'))
7536019783825143230
Links
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
Built Distributions
Close
Hashes for jump-consistent-hash-3.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba55ae459107ca353d3f285deef9d15d5c35a894e300370f7b91b267bcd5f65 |
|
MD5 | f0104a26db6a733487dc1eaf79aab13e |
|
BLAKE2b-256 | f02aa560a8efbcc6468df99d8e3b574a27e7d233d50e7890671f373a1a8fe19f |
Close
Hashes for jump_consistent_hash-3.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b0ad614f9298ee1783c2516cd1b237bef6a0e71464461daaeee557a5d679c6 |
|
MD5 | 3ef88ed6e8a7c2e916922f0618e83b12 |
|
BLAKE2b-256 | 8f37fbde6dc2edf127d8118704828e01e4ffe3514de247461aee241524d1f8bf |
Close
Hashes for jump_consistent_hash-3.1.2-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3afd5f58d5c7543b809e9f548895bdaa826c36a21838ac43a83fe035739453d |
|
MD5 | 9a8b5c398afe5b0e39d9e582561176cc |
|
BLAKE2b-256 | d522fb5fa7037d443abe87f82c8ecd62888b42b53d483ce1a30f583f007a6a5f |
Close
Hashes for jump_consistent_hash-3.1.2-cp39-cp39-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be5ddf1633e6f55e28b792341f5ce1f244c401db2174c19d4d884cb8c2c99d3f |
|
MD5 | fde331e524eb6c8b9b59571e989226e2 |
|
BLAKE2b-256 | c946c5bb36ac4ec183a4db8268584a4bc2d48955612c238ebbc013f7e64ba3bc |
Close
Hashes for jump_consistent_hash-3.1.2-cp39-cp39-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89fcdeb2b7a61b640346c70633432a5698218a2c4462e3e7069275987fbb673c |
|
MD5 | 19971620c786aae916e6dcde5c873032 |
|
BLAKE2b-256 | 299bb321c4c569be43415ea636b209844f75bdebbc8f0c4a33d5bd39159b4ced |
Close
Hashes for jump_consistent_hash-3.1.2-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c29531e5434f3c1cb5942795b2443b54f538127207b36a232cd2c588fcdb8f7a |
|
MD5 | e237166533b3d6e61592a0c762b4712a |
|
BLAKE2b-256 | 4aada19cef32b68734cd024a992e99a7bf826082e02fac44a22ba2ebec145423 |
Close
Hashes for jump_consistent_hash-3.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5359b550d55a86713e10ddb042961645522877d5313c88bbc9e6856780d723f0 |
|
MD5 | f559e7c44e456493864bbe186dc1c7ca |
|
BLAKE2b-256 | 4d8528d18dc7aafb16f86fcceba7e86d07cba907a565f304b00fe76df3cf66ea |
Close
Hashes for jump_consistent_hash-3.1.2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8e5851f361b31ee986c45b9b2587c41d44fb922084a0336f433c635c835f130 |
|
MD5 | e05b80925e055b556fdb37eec71a3d62 |
|
BLAKE2b-256 | d3f41048f810ac747c25ff868fefa89df1d78ac26a005e274597a72629d3c535 |
Close
Hashes for jump_consistent_hash-3.1.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 451c25b65f577da879b37c6776f0cdfb78a60d842786ea2acb44c5530de5366d |
|
MD5 | 473cbd53854ac906a46d794ab9f9b469 |
|
BLAKE2b-256 | d25315a5dc10c16a117c02abec00b3aab6617a5c66d938784421bfba8c6176ec |
Close
Hashes for jump_consistent_hash-3.1.2-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc57f134c9b5d8a3cdd18ddbbeafbd64f0accafd1cbb9dda83cd6be24c3acda |
|
MD5 | 95c5db861e913b86cc576b511268a226 |
|
BLAKE2b-256 | c026d6bbf2755bd34e76694275de06128d75b93c05b3442b98cccc4d4bfe2ad7 |
Close
Hashes for jump_consistent_hash-3.1.2-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e2ceb7f59aa5e142938e25c799abb682c37296d8fa3f2d6f9867a3cd24439d |
|
MD5 | ea83b9a3f416ae38478848bff7a72bd2 |
|
BLAKE2b-256 | b8296389b2ee2d8fd5edaea797782334b3e0ed48afbb13db1598176e90f91f68 |
Close
Hashes for jump_consistent_hash-3.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a0508cc970cf1165408d650bf6c11f0a4c2b953b7a195a93a5d9c1f78884b1 |
|
MD5 | c6de415e2e841f61cadb4042ba230d59 |
|
BLAKE2b-256 | 7e06cc6e1d49080f6f5c1732c154b90a8dfadb7c61730185ebd09761f5dc5515 |
Close
Hashes for jump_consistent_hash-3.1.2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b69f1dbd869cfdac49fa89410298a65a6ea41fa5d38b04f476a038d246cf013 |
|
MD5 | d3c49ee14e534c5ac8509dafa07b0cdc |
|
BLAKE2b-256 | f5afa19c774db92dcc228b27c6f65c09c38da1aa70c920da9da71b3735c8c1e8 |
Close
Hashes for jump_consistent_hash-3.1.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a2327747788661799e5f979b9b32a468ef6b118f518420943acda76432a487f |
|
MD5 | 14fbbe31895bcb549269ec3aaaf4277f |
|
BLAKE2b-256 | 1991b101597605fceb9286ae813cb6f5c0d15f1cb5b21e8090339f8c5041518b |
Close
Hashes for jump_consistent_hash-3.1.2-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64c728a8c3e6a78fd6fd2571bbe0f70a0837a6374307ccce6a4ae5aa11dde09f |
|
MD5 | 9662f4a7410c270e41dc227b32bb1939 |
|
BLAKE2b-256 | 219c71d96d2616b302c1c3e24ae5703e56f747904a75c93b21fad3c57b44b7e2 |
Close
Hashes for jump_consistent_hash-3.1.2-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba50d8bc202433e463b3f097d22fd00a2d334c5283ad465ff263aaf32f553d79 |
|
MD5 | bfb0e2839de4f24a5be5a7e799f9c317 |
|
BLAKE2b-256 | de80c40cb0fd2037b5c28b87bd6d85b6ae5fd7105d6509b9491d63c0060b9f7e |
Close
Hashes for jump_consistent_hash-3.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b82c87233dbd3ddd4dabe025335dae9685ab33b9c9e5cfbf84b8f76b8a316087 |
|
MD5 | ca8e6e2eb65cb6e67006fee602d92967 |
|
BLAKE2b-256 | 662f2cb10319dca39e45c632658e03cc54ab6e7bd60f7599e0dc91b7e02c20a1 |
Close
Hashes for jump_consistent_hash-3.1.2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58e0045187bfb8a904103b193b10fd99aea6cc496afcfd7d368716ff9eeda417 |
|
MD5 | dbe9aeeba62c1644e0736c0dc06628fa |
|
BLAKE2b-256 | 41ce95a9c915ea36ab3fcb69cbe8044bb3adc6ead4876778ca0f46657d5ce83a |
Close
Hashes for jump_consistent_hash-3.1.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 925e86c542b61224bf7ed01a7ed181468b461884f4b305014feed84fdae02aa0 |
|
MD5 | d71fe6dc69d80225bb62e4aed0669bb4 |
|
BLAKE2b-256 | 6c06ddccc3320b4dabeb2950e850295ca78df1732ddf5598241d41901363c549 |
Close
Hashes for jump_consistent_hash-3.1.2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4265fa89e734b966d5227ac0076f8ef563d8316cbb70830bd51eaaf0a50c4734 |
|
MD5 | 3a5a50fa071f4b0e3b0494bf793de65d |
|
BLAKE2b-256 | d69c57f528584babad77c4480fd52b252a459f15298e54e7fe1fd5a66a9b9232 |
Close
Hashes for jump_consistent_hash-3.1.2-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 588253028ae3c512b29b43f38ff3481b4f8cc84a6fac439622c4d205d16d4be3 |
|
MD5 | f0407999e30567363e299e2a58b7431a |
|
BLAKE2b-256 | a4300cf0f96a1ea285a3473109e45ba9287aadd75ce06034cf570fb29b4f4bd4 |
Close
Hashes for jump_consistent_hash-3.1.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0893690471c5239966b62739b056d372b676fc76fc4037cf6171b10d68ee2e5e |
|
MD5 | 4d0ac9edbbc15678454c6f7facce598b |
|
BLAKE2b-256 | df3d5004a80ed4a5ac17e00924b643105de0818fc86e11f3483ef540ca02eb47 |
Close
Hashes for jump_consistent_hash-3.1.2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdcb44f9e99e28a32265c26b9af1fa08de0865d37a4147e4250d022d2754b62 |
|
MD5 | 6db042e45996730bb9d40fe5f9e4647e |
|
BLAKE2b-256 | 1d3180cba38ca42e102dfe0f9add6109de87a11d966202f670047591e61ba2a3 |
Close
Hashes for jump_consistent_hash-3.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc920158bd4b3304b1ea67794a814efd4d3edd45ed1e5cea8427421de152e4a |
|
MD5 | 22ff73879fece06de7c52cbfec6a3e5b |
|
BLAKE2b-256 | 81615c8b4a4599dcfdd43b4eb9c95dca329bd87e851997b8de4bb8f60a8d4ed8 |
Close
Hashes for jump_consistent_hash-3.1.2-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07285cce19dfda1a63f0dd59844b6871574e40ab3224ec59218aeb14584ab0ac |
|
MD5 | dada8d581c5cfe42ab4e32b53847faab |
|
BLAKE2b-256 | d1ceec64dd513ecdcb95c77f6322d01fa4b75b3f9ed3168d42715955589656d8 |
Close
Hashes for jump_consistent_hash-3.1.2-cp35-cp35m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9a36cde17b8030ef89f1b4f168a22713134538c22c9fa99b2920a1d210a5f3 |
|
MD5 | c05127b13bc16ed8e55861153bb730c4 |
|
BLAKE2b-256 | 2a44717e311b3b53f2ecc2ddb274a65c0739d6c7788e682621b5a0edd10f21bc |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc5474130a276326e87d251f1554886831733ec72b0bfbeabf32909bbde58e1 |
|
MD5 | 27da13d1684d9ade67427b23ee247a90 |
|
BLAKE2b-256 | b49a842151697132eff2f5f1eaf80f15179e0e50e90692259f295619bbc4ffc8 |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a37d9b791be3c4bea5f7efce0da40a75fb611c8c3e3e40a5f14eb8f22acb755e |
|
MD5 | 97c24f996dab9e96c4e7ccd6ca2f94f0 |
|
BLAKE2b-256 | 407ca9d63006aebc2fa95fbeea8e6140e1eb485fe73d2462bfcdd424dc12316e |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb48ff89604bc401edbed419689db910cb523359c17aa78c2f736a51600d610e |
|
MD5 | e55795557e392ecd1a0e14436672fab8 |
|
BLAKE2b-256 | c618d4ff72506c9f9a7d720f5febd42a3f5840bdd098c1eab649901ad16c7384 |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 336695a2bebed001df950bac40cdb5a90b04ba637ddf504311819708f42fafcb |
|
MD5 | 9547fff80a5674d891766ffc4bb4678c |
|
BLAKE2b-256 | 796bbc7ae76fb447d4f99d1637b44394e1e7b6c5ad804d2cca31c61d6298c6b1 |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592b774b95c8481bc3cbbfb2cd0581faa4091447eb2a3962df7e614aa9dc6432 |
|
MD5 | a063db80e20161b90d84c0004d7dd55a |
|
BLAKE2b-256 | 1ab9c70e5af40039c69dfbe242f32f73cc780114e8464ae361604c3d0fc8525c |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd9fa8079bd18adc374d4f4ca78c7dfba8ed9b57685490fe5216df37d009bcc9 |
|
MD5 | c724e0cba98287bf95e55770519331c2 |
|
BLAKE2b-256 | a46ffcdee364b2e66c9d02bb2a55cf0874004d2219185ef0764ade218b8bd983 |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c01b3ccbd9605e50fae5d73590dca8cb70f366eb99763cc54dc712564f57f11 |
|
MD5 | 6165da27a937e73fbe2e66b54d1de044 |
|
BLAKE2b-256 | 220bb759677ce6a4f90d4abddc5ffda3d3a098a0d67a0638a29548258e6f34ce |
Close
Hashes for jump_consistent_hash-3.1.2-cp27-cp27m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64f85e1c196705c35400d02ed365e1f1cfe7a4424181d65f224c650dcbf79625 |
|
MD5 | aa85256f125466d7ab75a592b0d72395 |
|
BLAKE2b-256 | 06871f979246f7c389e394a8adfe09868ee97e8e9faaee007fe340492c23d2fc |