{"id":5592,"library":"clandestined","title":"Clandestined Rendezvous Hashing","description":"Clandestined is a Python library that implements rendezvous hashing, also known as highest random weight (HRW) hashing. It provides a distributed algorithm for choosing a node from a set of available nodes, ensuring that a minimal number of mappings change when nodes are added or removed. It's built upon the murmur3 hash function. The current version is 1.1.0, and the project's release cadence has been infrequent since its last update in 2016.","status":"maintenance","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/ewdurbin/clandestined-python","tags":["hashing","consistent hashing","rendezvous hashing","distributed systems","murmur3"],"install":[{"cmd":"pip install clandestined","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"RendezvousHash","correct":"from clandestined import RendezvousHash"},{"symbol":"Cluster","correct":"from clandestined import Cluster"}],"quickstart":{"code":"from clandestined import RendezvousHash\n\n# Initialize with a list of node IDs\nrh = RendezvousHash(['node-a', 'node-b', 'node-c'])\n\n# Find the appropriate node for a given key\nkey_to_hash = 'user_session_123'\nassigned_node = rh.find_node(key_to_hash)\nprint(f\"Key '{key_to_hash}' assigned to: {assigned_node}\")\n\n# Add a new node\nrh.add_node('node-d')\nnew_assigned_node = rh.find_node(key_to_hash)\nprint(f\"After adding node-d, key '{key_to_hash}' assigned to: {new_assigned_node}\")\n\n# Remove a node\nrh.remove_node('node-a')\nfinal_assigned_node = rh.find_node(key_to_hash)\nprint(f\"After removing node-a, key '{key_to_hash}' assigned to: {final_assigned_node}\")","lang":"python","description":"This quickstart demonstrates how to initialize `RendezvousHash` with a set of nodes, find the responsible node for a given key, and dynamically add or remove nodes while maintaining consistent hashing properties."},"warnings":[{"fix":"Update constructor calls to use `seed=` instead of `murmur_seed=`.","message":"The `murmur_seed` keyword argument for `Cluster` and `RendezvousHash` constructors was renamed to `seed`.","severity":"breaking","affected_versions":"<1.0.0b"},{"fix":"Ensure that the node or zone ID exists before attempting to remove it, or wrap calls in a `try...except ValueError` block.","message":"Calling `Cluster.remove_zone`, `Cluster.remove_node`, or `RendezvousHash.remove_node` with a non-existent ID now raises a `ValueError` instead of silently failing.","severity":"breaking","affected_versions":"<1.0.0b"},{"fix":"If custom hashing is required, consider forking the project or implementing rendezvous hashing manually, as the library no longer supports this feature directly.","message":"Support for custom hash functions (passing a callable to `__init__`) was retracted for the 1.0.0 milestone.","severity":"breaking","affected_versions":"<1.0.0b"},{"fix":"Be aware of this deterministic tie-breaking when upgrading from pre-1.0.0rc1 versions, as it might slightly alter node assignments in rare collision scenarios.","message":"Behavior for hash collisions was updated in 1.0.0rc1. In the event of a hash collision between node IDs, the winner is now chosen by `max(str(node_id_1), str(node_id_2))`, providing a deterministic tie-breaking mechanism.","severity":"gotcha","affected_versions":"<1.0.0rc1"},{"fix":"Thoroughly test in your target Python environment. Consider reviewing the source code for C extension compilation issues or Python 2-isms if encountering problems.","message":"The library's `requires_python` field is `UNKNOWN` on PyPI, and its last significant update was in 2016. While some Python 3 compatibility was added in 1.0.1, its compatibility with very modern Python versions (e.g., Python 3.9+) or complex environments might be limited due to the age of the codebase and its C extension (`_murmur3`).","severity":"gotcha","affected_versions":"All versions on newer Python interpreters"}],"env_vars":null,"search_vec":"'1.1.0':62 '2016':77 'ad':47 'algorithm':25 'also':13 'avail':34 'built':52 'cadenc':68 'chang':43 'choos':27 'clandestin':1,4 'consist':79 'current':59 'distribut':24,83 'ensur':36 'function':57 'hash':3,12,20,56,78,80,82 'highest':16 'hrw':19 'implement':10 'infrequ':71 'known':14 'last':74 'librari':8 'map':42 'minim':39 'murmur3':55,85 'node':29,35,45 'number':40 'project':65 'provid':22 'python':7 'random':17 'releas':67 'remov':49 'rendezv':2,11,81 'set':32 'sinc':72 'system':84 'updat':75 'upon':53 'version':60 'weight':18","created_at":"2026-04-14T03:35:19.927242+00:00","updated_at":"2026-04-16T02:14:44.662246+00:00","problems":[{"fix":"Update constructor calls to use `seed=` instead of `murmur_seed=`.","cause":"The `murmur_seed` keyword argument for `Cluster` and `RendezvousHash` constructors was renamed to `seed` in version 1.0.0.","error":"TypeError: __init__() got an unexpected keyword argument 'murmur_seed'"},{"fix":"Ensure that the node or zone ID exists before attempting to remove it, or wrap the call in a `try...except ValueError` block.","cause":"Calling `Cluster.remove_zone`, `Cluster.remove_node`, or `RendezvousHash.remove_node` with a non-existent ID now raises a `ValueError` instead of silently failing since version 1.0.0.","error":"ValueError: Node with ID '<node_id>' does not exist."},{"fix":"The library no longer supports custom hash functions directly. Consider forking the project or implementing rendezvous hashing manually if custom hashing is required.","cause":"Support for passing custom hash functions (as a callable to `__init__`) was retracted for the 1.0.0 milestone.","error":"TypeError: RendezvousHash.__init__() got an unexpected keyword argument 'hash_func'"},{"fix":"Verify that `clandestined` is installed (`pip show clandestined`). If installation issues persist, ensure your Python environment is compatible (e.g., try with slightly older Python 3.x versions if using a very new one), check compiler tools are available for the C extension, or review the source code for C extension compilation problems.","cause":"The `clandestined` library or its underlying C extension (`_murmur3`) failed to install correctly, possibly due to compatibility issues with modern Python versions (e.g., Python 3.9+) or complex environments, as the library's `requires_python` field is `UNKNOWN` on PyPI and its last significant update was in 2016.","error":"ModuleNotFoundError: No module named 'clandestined'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ewdurbin/clandestined-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/clandestined/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","http-networking","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"failing","verified_at":"2026-06-28","last_verified":"2026-08-30","next_check":"2026-07-28","install_tag":null}}