{ "info": { "author": "Amir Salihefendic", "author_email": "amix@amix.dk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "About hash_ring\n---------------\n\nImplements consistent hashing that can be used when\nthe number of server nodes can increase or decrease (like in memcached).\nThe hashing ring is built using the same algorithm as libketama.\n\nConsistent hashing is a scheme that provides a hash table functionality\nin a way that the adding or removing of one slot\ndoes not significantly change the mapping of keys to slots.\n\nMore about hash_ring can be read in a blog post (that explains the idea in greater details):\n\n* Consistent hashing implemented simply in python \n\nMore information about consistent hashing can be read in these articles:\n\n* Web Caching with Consistent Hashing \n* Consistent hashing and random trees \n\nThere is also a wrapper MemcacheRing that extends python-memcache to use consistent hashing\nfor key distribution.\n\n\nExample\n-------\n\nBasic example of usage (for managing memcached instances)::\n\n memcache_servers = ['192.168.0.246:11212',\n '192.168.0.247:11212',\n '192.168.0.249:11212']\n\n ring = HashRing(memcache_servers)\n server = ring.get_node('my_key')\n\nExample using weights::\n\n memcache_servers = ['192.168.0.246:11212',\n '192.168.0.247:11212',\n '192.168.0.249:11212']\n weights = {\n '192.168.0.246:11212': 1,\n '192.168.0.247:11212': 2,\n '192.168.0.249:11212': 1\n }\n\n ring = HashRing(memcache_servers, weights)\n server = ring.get_node('my_key')\n\nHow to use MemcacheRing::\n\n from hash_ring import MemcacheRing\n mc = MemcacheRing(['127.0.0.1:11212'])\n mc.set('hello', 'world')\n print mc.get('hello')\n\nThe code should be clean and simple. Feel free to concat the author if you detect bugs.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.amix.dk/", "keywords": "memcached hashing hash consistent", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "hash_ring", "package_url": "https://pypi.org/project/hash_ring/", "platform": "Any", "project_url": "https://pypi.org/project/hash_ring/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.amix.dk/" }, "release_url": "https://pypi.org/project/hash_ring/1.3.1/", "requires_dist": null, "requires_python": null, "summary": "Implements consistent hashing in Python (using md5 as hashing function).", "version": "1.3.1" }, "last_serial": 792827, "releases": { "0.95": [ { "comment_text": "", "digests": { "md5": "f371fc2ab3b5ae096dfe91fba2e4ea4e", "sha256": "91686cf150c239bf715dcca721fa6cacf9ca1474f314e58bac0244df43830dd1" }, "downloads": -1, "filename": "hash_ring-0.95-py2.5.egg", "has_sig": false, "md5_digest": "f371fc2ab3b5ae096dfe91fba2e4ea4e", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 5238, "upload_time": "2008-11-20T11:41:26", "url": "https://files.pythonhosted.org/packages/4e/3d/c813fe163a89f59e336683b274c46d625c50768848102c96d960d64ddde0/hash_ring-0.95-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "350dac3979d07927534d20dc27898c78", "sha256": "7b734dee5f409132d4df69e811dc64fc69a03479cd91f297796c261be258db31" }, "downloads": -1, "filename": "hash_ring-0.95.tar.gz", "has_sig": false, "md5_digest": "350dac3979d07927534d20dc27898c78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3008, "upload_time": "2008-11-20T11:41:26", "url": "https://files.pythonhosted.org/packages/48/f7/61c9bfd768bd92f84da01b3f06112892ec5a96109bf3a377366a5e306771/hash_ring-0.95.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "b2899b0f4bdd3de64e8d3b6346187478", "sha256": "59b6b703b3422b5790f41691b8cd2fdb52db94958ddcafdf913d70a003e8b47d" }, "downloads": -1, "filename": "hash_ring-1.0-py2.5.egg", "has_sig": false, "md5_digest": "b2899b0f4bdd3de64e8d3b6346187478", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 5813, "upload_time": "2008-11-24T12:05:54", "url": "https://files.pythonhosted.org/packages/39/bd/6ee7d32c2779a9f607596a03a54bea441bef5acf44dff3c689e4164b1837/hash_ring-1.0-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "22b890b2a8309047bf4007c761ddf059", "sha256": "6dfa7c8a13c64e70d7300a166958417dfe52c5341f1d35a71ff7bb94d40aff18" }, "downloads": -1, "filename": "hash_ring-1.0.tar.gz", "has_sig": false, "md5_digest": "22b890b2a8309047bf4007c761ddf059", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3318, "upload_time": "2008-11-24T12:05:53", "url": "https://files.pythonhosted.org/packages/97/d3/0d4cd393168d8a6c4e44f3693d531ad9b87a8abf67e34c91bbd9dfe79759/hash_ring-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "644a0935a85e2a4ed0537b222082550c", "sha256": "2659782c0cb061f962250f04b0230602ad8feb4c398c645e3d1e97bf74d312b8" }, "downloads": -1, "filename": "hash_ring-1.1-py2.5.egg", "has_sig": false, "md5_digest": "644a0935a85e2a4ed0537b222082550c", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 12615, "upload_time": "2008-11-25T14:40:37", "url": "https://files.pythonhosted.org/packages/f9/26/e6a45f1826aeb643a4e6ba377f0586b22eedafefd3ec75c07dd5c77c6d2d/hash_ring-1.1-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "e059a1ddca398bb24c33621b4f44269b", "sha256": "b444dea3927f5abe5a470f726d27d90d9b712e6981b9b3f3cfd4bb183a425fa5" }, "downloads": -1, "filename": "hash_ring-1.1.tar.gz", "has_sig": false, "md5_digest": "e059a1ddca398bb24c33621b4f44269b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4043, "upload_time": "2008-11-25T14:40:37", "url": "https://files.pythonhosted.org/packages/81/61/f45b974bc39c6dc16039c4b096ed1ec4532bbe87dd7d3d3c5fed13bf62dc/hash_ring-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "c0e7f749d40822bd99bbb43d78a615ca", "sha256": "ef48043edba210794568004cefec1d5f23261eab49ba86f70a833e6b262d119d" }, "downloads": -1, "filename": "hash_ring-1.2-py2.5.egg", "has_sig": false, "md5_digest": "c0e7f749d40822bd99bbb43d78a615ca", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 12680, "upload_time": "2009-02-28T23:45:53", "url": "https://files.pythonhosted.org/packages/9e/ed/a39738b91643a38b221ed45cfc417223aaa01d23939e1da0515f83a34a64/hash_ring-1.2-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "ada64f9827572621edf73d86f02b20ae", "sha256": "c156121630c1cc5411ca91fad625e1ccaa7a51dd347ead6a8bda06bf556da9f5" }, "downloads": -1, "filename": "hash_ring-1.2.tar.gz", "has_sig": false, "md5_digest": "ada64f9827572621edf73d86f02b20ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3900, "upload_time": "2009-02-28T23:45:47", "url": "https://files.pythonhosted.org/packages/ba/54/8b7bfaab16040a39faffaf699a5b61d9d8f386b0bedc134175b382323d7c/hash_ring-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "bb554145658fc04d57c52a5aedb13ac5", "sha256": "b03976c2547fab6e8306cf9926430a05580cdd7de37c8d443397721657312c3a" }, "downloads": -1, "filename": "hash_ring-1.3-py2.7.egg", "has_sig": false, "md5_digest": "bb554145658fc04d57c52a5aedb13ac5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8236, "upload_time": "2012-12-15T01:22:26", "url": "https://files.pythonhosted.org/packages/63/f0/ada04fb52f82d02793a3b9f6401b2ea2fc4d32d9945493e04102f93e4286/hash_ring-1.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "fc35b8de33d5d1374d1a77f075bf38b6", "sha256": "f08830eae68ef6679edf2f444f2146d3fc606da17eda0aa4dde28a04090986f1" }, "downloads": -1, "filename": "hash_ring-1.3.tar.gz", "has_sig": false, "md5_digest": "fc35b8de33d5d1374d1a77f075bf38b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3903, "upload_time": "2012-12-15T01:21:56", "url": "https://files.pythonhosted.org/packages/e6/14/9ea746a5ee620ad844095ff2aa6275f9a03be9f4b95fa932ef681ef5f854/hash_ring-1.3.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "7c8d1592d0c31d8164d08a529877ae00", "sha256": "67b05e6c753a982cda85e4b1c010493b159e53ab112c3ac3b1c8fb6734f050d7" }, "downloads": -1, "filename": "hash_ring-1.3.1-py2.7.egg", "has_sig": false, "md5_digest": "7c8d1592d0c31d8164d08a529877ae00", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8372, "upload_time": "2012-12-21T22:42:13", "url": "https://files.pythonhosted.org/packages/48/0d/070787770ee36992a37caaeb32135aec27756f8e15f1cef7a316d0af9bec/hash_ring-1.3.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "16905a5bc16927a03a1ec29f7f762649", "sha256": "f86b96517bc5cb7dbf34bbbc51cdd5968170877b43bc1ab7c9eb39345cff4dd7" }, "downloads": -1, "filename": "hash_ring-1.3.1.tar.gz", "has_sig": false, "md5_digest": "16905a5bc16927a03a1ec29f7f762649", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3970, "upload_time": "2012-12-21T22:42:32", "url": "https://files.pythonhosted.org/packages/32/f1/798501920f7043d93707ccd902e7d9a0cfb68efc8d8051c16a3f8ee6c64f/hash_ring-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7c8d1592d0c31d8164d08a529877ae00", "sha256": "67b05e6c753a982cda85e4b1c010493b159e53ab112c3ac3b1c8fb6734f050d7" }, "downloads": -1, "filename": "hash_ring-1.3.1-py2.7.egg", "has_sig": false, "md5_digest": "7c8d1592d0c31d8164d08a529877ae00", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8372, "upload_time": "2012-12-21T22:42:13", "url": "https://files.pythonhosted.org/packages/48/0d/070787770ee36992a37caaeb32135aec27756f8e15f1cef7a316d0af9bec/hash_ring-1.3.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "16905a5bc16927a03a1ec29f7f762649", "sha256": "f86b96517bc5cb7dbf34bbbc51cdd5968170877b43bc1ab7c9eb39345cff4dd7" }, "downloads": -1, "filename": "hash_ring-1.3.1.tar.gz", "has_sig": false, "md5_digest": "16905a5bc16927a03a1ec29f7f762649", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3970, "upload_time": "2012-12-21T22:42:32", "url": "https://files.pythonhosted.org/packages/32/f1/798501920f7043d93707ccd902e7d9a0cfb68efc8d8051c16a3f8ee6c64f/hash_ring-1.3.1.tar.gz" } ] }