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.
pip install clandestinedVerified import paths — ran on the pinned version, not inferred.
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.
Update constructor calls to use `seed=` instead of `murmur_seed=`.
Ensure that the node or zone ID exists before attempting to remove it, or wrap calls in a `try...except ValueError` block.
If custom hashing is required, consider forking the project or implementing rendezvous hashing manually, as the library no longer supports this feature directly.
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.
Thoroughly test in your target Python environment. Consider reviewing the source code for C extension compilation issues or Python 2-isms if encountering problems.
Update constructor calls to use `seed=` instead of `murmur_seed=`.
Ensure that the node or zone ID exists before attempting to remove it, or wrap the call in a `try...except ValueError` block.
The library no longer supports custom hash functions directly. Consider forking the project or implementing rendezvous hashing manually if custom hashing is required.
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.
No dependency data recorded yet.