CI status:
This library is a thin python wrapper around hash ring implementation in https://github.com/chrismoos/hash-ring
Installing
pyhashring can be installed via pypi:
pip install pyhashring
Building
Get the source:
git clone https://github.com/blackwithwhite666/pyhashring.git
Compile extension:
python setup.py build_ext --inplace
Usage
Get node by key:
from pyhashring import HashRing
h = HashRing()
h.add(b'SlotA')
h.add(b'SlotB')
h.find('keyA')
>>> 'SlotB'
h.find('keyB')
>>> 'SlotA'
Running the test suite
Use Tox to run the test suite:
tox
Changelog
0.1.0 (initial release)
Prototype.
Release files for pyhashring 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyhashring-0.1.0.tar.gz | 39.4 kB | Details |
Release files / pyhashring-0.1.0.tar.gz
| Download URL | pyhashring-0.1.0.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f36a226f489133790ee80c651c8853bebb5246bfea5e991f597941fb2b83045f
|
|
BLAKE2b-256 checksum How to use checksums |
82b676de070f5ed178d09d29f14d53f5acea74967187d921baa3294404d48a2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |