Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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 hashes
Filename, size cohash-0.1.4.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page