{"id":17147853,"url":"https://github.com/lithammer/python-jump-consistent-hash","last_synced_at":"2025-04-05T10:10:45.203Z","repository":{"id":28859139,"uuid":"32383240","full_name":"lithammer/python-jump-consistent-hash","owner":"lithammer","description":"Fast, minimal memory, consistent hash algorithm","archived":false,"fork":false,"pushed_at":"2024-12-01T09:34:18.000Z","size":211,"stargazers_count":41,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T09:11:40.045Z","etag":null,"topics":["consistent-hashing","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/jump-consistent-hash/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lithammer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"lithammer"}},"created_at":"2015-03-17T09:22:16.000Z","updated_at":"2024-12-01T09:34:21.000Z","dependencies_parsed_at":"2023-12-26T12:09:39.028Z","dependency_job_id":"b2d72a74-c7db-498a-922d-0e605fe5f857","html_url":"https://github.com/lithammer/python-jump-consistent-hash","commit_stats":{"total_commits":169,"total_committers":5,"mean_commits":33.8,"dds":0.5798816568047338,"last_synced_commit":"ad21c511627a6cadf8cbf789990785fc3d9948a8"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithammer%2Fpython-jump-consistent-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithammer%2Fpython-jump-consistent-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithammer%2Fpython-jump-consistent-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithammer%2Fpython-jump-consistent-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lithammer","download_url":"https://codeload.github.com/lithammer/python-jump-consistent-hash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318745,"owners_count":20919484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consistent-hashing","python"],"created_at":"2024-10-14T21:26:16.802Z","updated_at":"2025-04-05T10:10:45.185Z","avatar_url":"https://github.com/lithammer.png","language":"Python","readme":"Jump Consistent Hash\n--------------------\n\n.. image:: https://github.com/lithammer/python-jump-consistent-hash/workflows/Python/badge.svg\n   :alt: Build Status\n   :target: https://github.com/lithammer/python-jump-consistent-hash/actions\n\nPython and C implementation of the jump consistent hash algorithm by John\nLamping and Eric Veach[1]. Tested on Python 3.8+.\n\nInstall\n-------\n\nTo install Jump Consistent Hash, simply run this simple command in your\nterminal of choice::\n\n   $ pip install jump-consistent-hash\n\nThe C implementation is optional but is about 10x faster than the pure Python\nimplementation in CPython.\n\nUsage\n`````\n\n.. code:: python\n\n   \u003e\u003e\u003e import jump\n   \u003e\u003e\u003e jump.hash(256, 1024)\n   520\n\nIf you want to use a ``str`` as a key instead of an ``int``, you can pass it\nthrough a hash function to compute a real key. Here's a couple of examples\nusing Python 3:\n\n.. code:: python\n\n   \u003e\u003e\u003e import hashlib\n   \u003e\u003e\u003e int(hashlib.md5(b\"127.0.0.1\").hexdigest(), 16)\n   325870950296970981340734819828239218902\n\n   \u003e\u003e\u003e int(hashlib.sha1(b\"127.0.0.1\").hexdigest(), 16)\n   431133456357828263809343936597625557575256328153\n\n   \u003e\u003e\u003e import binascii\n   \u003e\u003e\u003e binascii.crc32(b\"127.0.0.1\") \u0026 0xffffffff\n   3619153832\n\n   \u003e\u003e\u003e abs(hash(\"127.0.0.1\"))\n   7536019783825143230\n\nLinks\n`````\n\n[1] http://arxiv.org/pdf/1406.2294v1.pdf\n","funding_links":["https://github.com/sponsors/lithammer"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithammer%2Fpython-jump-consistent-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flithammer%2Fpython-jump-consistent-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithammer%2Fpython-jump-consistent-hash/lists"}