$npx skillfedfor your agent

uhashring

Full featured consistent hashing python library compatible with ketama.

Worth itPyPI Python ModulesReleased Aug 2026593.1K downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — uhashring-2.5-py3-none-any.whl
v2.5 · released 2026-08-03 · Python >=3.10

Yes. uhashring is a mature, actively maintained library with no security vulnerabilities, zero runtime dependencies, and broad Python version support. It solves a well-defined problem (consistent hashing) with a clean API and optional advanced features. Install it if you need stable key-to-node mapping in a distributed system or cache layer.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low install friction; pure Python with no runtime dependencies.
  • Actively maintained as of 2026-08-05, supporting current Python versions (3.10+) with PyPy compatibility.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions.

last release 2026-08-03 (11 days) · last repo commit 2026-08-05 · 222 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 593,119 downloads/mo, #5,849 on PyPI

Verify before relying

from uhashring import HashRing

# Create a consistent hash ring with 3 nodes
hr = HashRing(nodes=['node1', 'node2', 'node3'])

# Get the target node for a key
target_node = hr.get_node('coconut')
  • Performance characteristics (lookup time, ring regeneration speed) under various node counts and topologies.
  • Actual collision rates and distribution uniformity compared to ketama or other hash functions in production scenarios.
Same gist for agents: .md · .json

What it is and what it does

uhashring is a pure-Python library that implements consistent hashing, a technique for distributing keys across a set of nodes in a way that minimizes remapping when nodes join or leave the system. It's commonly used in distributed caches, databases, and load-balancing scenarios where you need stable key-to-node assignments. The library offers both a simple API for basic use and advanced configuration options including custom hash functions, per-node weights, and ketama compatibility for interoperability with other systems.

The package supports multiple hash strategies: by default it uses MD5 with 160 virtual nodes per node, but can also operate in ketama-compatible mode for systems that need it. You can customize the hash function, weight calculation, and virtual node count per node. It has no external runtime dependencies and runs on CPython and PyPy, making it suitable for a range of deployment scenarios.

Use it for

  • Distributing cache keys across multiple memcached or Redis instances while maintaining stable mappings during server additions or failures.
  • Load-balancing requests or data across a cluster of backend nodes with minimal key remapping during scaling events.
  • Implementing sharding logic in a distributed database where keys must consistently map to the same shard.
  • Migrating from libketama-based systems while maintaining hash ring compatibility and key distribution.
  • Building a custom distributed system where you need fine control over node weights and virtual node counts.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

uhashring is a mature, actively maintained library with no security vulnerabilities, zero runtime dependencies, and broad Python version support. It solves a well-defined problem (consistent hashing) with a clean API and optional advanced features. Install it if you need stable key-to-node mapping in a distributed system or cache layer.

Install

uhashring on PyPI

Before you install

Low install friction; pure Python with no runtime dependencies. Actively maintained as of 2026-08-05, supporting current Python versions (3.10+) with PyPy compatibility.

Requires Python 3.10 or later.

License in practice

BSD-3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions.

Quickstart

from uhashring import HashRing

# Create a consistent hash ring with 3 nodes
hr = HashRing(nodes=['node1', 'node2', 'node3'])

# Get the target node for a key
target_node = hr.get_node('coconut')

Verify before relying

  • Performance characteristics (lookup time, ring regeneration speed) under various node counts and topologies.
  • Actual collision rates and distribution uniformity compared to ketama or other hash functions in production scenarios.

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 11 days since the last release
Last repo commit
First released
Downloads593,119 / month, #5,849 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Evidence: uhashring-2.5-py3-none-any.whl

Tags

Capabilities
consistent hashing pythondistributed cache key mappingketama compatible hashinghash ring implementationnode distribution algorithmmemcache consistent hashvirtual nodes hashing
Topics
distributed-systemscachinghashing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “consistent hashing python”

  • uhashringuhashring implements consistent hashing in pure Python, mapping keys…
  • dict-hashGenerates consistent hashes for Python dictionaries and supports…
  • hashringImplements consistent hashing in Python using md5 as the hashing…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also hashring · clandestined · murmurhash · dict-hash · fnvhash · dirhash · clickhouse-cityhash · ImageHash · simhash · siphash