{ "info": { "author": "Yummy Bian", "author_email": "yummy.bian#gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "consistent-hash\n===============\n\nImplements consistent hashing that can be used when the number of server nodes can increase or decrease.The algorithm that is used for consistent hashing is the same as libketama \n\nUsage\n===============\nIt's so easy to use^_^::\n\n from consistent_hash import ConsistentHash\n \n # You can construct consistent hash with the below three ways\n con_hash = ConsistentHash({'192.168.0.101:11212':1, '192.168.0.102:11212':2, '192.168.0.103:11212':1})\n # Or\n con_hash = ConsistentHash(['192.168.0.101:11212', '192.168.0.102:11212', '192.168.0.103:11212']))\n # Or\n con_hash = ConsistentHash('192.168.0.101:11212')\n \n # Add servers to hash ring\n con_hash.add_nodes({'192.168.0.104:11212':1})\n # Get a server via the key of object\n server = con_hash.get_node('my_key')\n # Delete the server from hash ring, you don't need to indicate weights\n con_hash.del_nodes(['192.168.0.102:11212', '192.168.0.104:11212'])\n\n\nUnit test\n===============\n- Firstly, install nose which extends unittest to make testing easier::\n\n pip install nose\n \n \n- Then, run tests::\n \n # Option -s any stdout output will be printed immediately\n # and -v be more verbose\n nosetests -s -v\n\n\nMore information about nose ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yummybian", "keywords": "consistent hash hashing", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "consistent_hash", "package_url": "https://pypi.org/project/consistent_hash/", "platform": "Any", "project_url": "https://pypi.org/project/consistent_hash/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/yummybian" }, "release_url": "https://pypi.org/project/consistent_hash/1.0/", "requires_dist": null, "requires_python": null, "summary": "Implements consistent hashing with Python and the algorithm is the same as libketama.", "version": "1.0" }, "last_serial": 788383, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "0c0d8ce9976d0283da26783dc543006f", "sha256": "adc3bf7cba13dd2cabe50c5d4507d9a8a3ff2610b6801e88acf73d158946658d" }, "downloads": -1, "filename": "consistent_hash-1.0-py2.7.egg", "has_sig": false, "md5_digest": "0c0d8ce9976d0283da26783dc543006f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6799, "upload_time": "2012-10-24T15:20:24", "url": "https://files.pythonhosted.org/packages/d4/f4/9dfe91d8b7585e0b08c3ec11f7387bc996c6a721b7d3cd5cc9402436a80b/consistent_hash-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4f18a0df135ef4416029f6d733738c68", "sha256": "d9f88eff086680918b458b62994fbf07ef97736771f1e9f3b05855547636a7ac" }, "downloads": -1, "filename": "consistent_hash-1.0.tar.gz", "has_sig": false, "md5_digest": "4f18a0df135ef4416029f6d733738c68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3657, "upload_time": "2012-10-24T15:20:19", "url": "https://files.pythonhosted.org/packages/26/be/c87797f4c4d941486747997608c425d5a47e9fcc3da27759fd00488b0e2e/consistent_hash-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0c0d8ce9976d0283da26783dc543006f", "sha256": "adc3bf7cba13dd2cabe50c5d4507d9a8a3ff2610b6801e88acf73d158946658d" }, "downloads": -1, "filename": "consistent_hash-1.0-py2.7.egg", "has_sig": false, "md5_digest": "0c0d8ce9976d0283da26783dc543006f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6799, "upload_time": "2012-10-24T15:20:24", "url": "https://files.pythonhosted.org/packages/d4/f4/9dfe91d8b7585e0b08c3ec11f7387bc996c6a721b7d3cd5cc9402436a80b/consistent_hash-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4f18a0df135ef4416029f6d733738c68", "sha256": "d9f88eff086680918b458b62994fbf07ef97736771f1e9f3b05855547636a7ac" }, "downloads": -1, "filename": "consistent_hash-1.0.tar.gz", "has_sig": false, "md5_digest": "4f18a0df135ef4416029f6d733738c68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3657, "upload_time": "2012-10-24T15:20:19", "url": "https://files.pythonhosted.org/packages/26/be/c87797f4c4d941486747997608c425d5a47e9fcc3da27759fd00488b0e2e/consistent_hash-1.0.tar.gz" } ] }