Skip to main content

Hash ring wrapper for python.

Project description

CI status: cistatus

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhashring-0.1.0.tar.gz (39.4 kB view details)

Uploaded Source

File details

Details for the file pyhashring-0.1.0.tar.gz.

File metadata

  • Download URL: pyhashring-0.1.0.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyhashring-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f36a226f489133790ee80c651c8853bebb5246bfea5e991f597941fb2b83045f
MD5 ef5de17618074f72d998fa6682cd9a65
BLAKE2b-256 82b676de070f5ed178d09d29f14d53f5acea74967187d921baa3294404d48a2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page