Skip to main content

Consistency hash algorithm implementation in Python.

Project description

https://badge.fury.io/py/cohash.svg?2 https://travis-ci.org/theharveyz/cohash.py.svg?branch=master

Consistency hash algorithm implementation in Python

Install

pip install cohash

Usage

import cohash
ch = cohash.Hash(nodes = [
    '192.168.01',
    '192.168.02',
    '192.168.03',
    '192.168.04',
], vnum = 1000)
key = 'random-key'
print ch.gen(key)

LICENSE

MIT

Project details


Download files

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

Files for cohash, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size cohash-0.1.4-py2.py3-none-any.whl (3.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size cohash-0.1.4.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page