Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

theharveyz/cohash.py

Repository files navigation

cohash.py

image

image

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

About

Consistency hash algorithm implementation in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published