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.

Source Distribution

cohash-0.1.4.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cohash-0.1.4-py2.py3-none-any.whl (3.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cohash-0.1.4.tar.gz.

File metadata

  • Download URL: cohash-0.1.4.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cohash-0.1.4.tar.gz
Algorithm Hash digest
SHA256 04cb5cb5fb40c1fc35d2792831d9c5f67ab636c8b3ff175b3bb6bde136b4a0fc
MD5 f9592d9f5ace2a2142c68bc2d74cfe9a
BLAKE2b-256 04e41dd07097032c453c7d8d5ecdf4ebe419ba5986b421222ef3d80ce2a27316

See more details on using hashes here.

File details

Details for the file cohash-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cohash-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 264f0a1edf4722839b7a15ad2cd74d86ab8edd349e89d07d493b9c32bc3bc3e1
MD5 86bd71a257d0ae4c019c05fa432fcfc7
BLAKE2b-256 f9a42dd94260c16821a7dd7b0ed45d660f6366d2473b17f775b27e3016019d8e

See more details on using hashes here.

Supported by

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