{ "info": { "author": "Bin Zhang", "author_email": "524243642@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Ratel\n\n[![PyPI version](https://img.shields.io/pypi/v/ratel.svg)](https://pypi.org/project/ratel/)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/ratel.svg)](https://pypi.org/project/ratel/)\n[![Build Status](https://travis-ci.org/524243642/ratel.svg?branch=master)](https://travis-ci.org/524243642/ratel)\n[![codecov](https://codecov.io/gh/524243642/ratel/branch/master/graph/badge.svg)](https://codecov.io/gh/524243642/ratel)\n[![ratel PyPI Downloads](https://img.shields.io/pypi/dm/ratel.svg?colorB=green)](https://pypistats.org/packages/ratel)\n[![GitHub](https://img.shields.io/github/license/524243642/ratel.svg)](LICENSE.txt)\n\nSkip list is a data structure that allows fast search within an ordered sequence \nof elements and a probabilistic alternative to Balanced Trees.It is also easier\nto implement.\nThis library uses redis skip list to implement SortedSet data types for Python\n\nThis library modified in four ways:\n1) This implementation is allowed to repeated scores.\n2) The comparison is not just by score but by key data.\n3) It's a doubly linked list with the backward being only at \"level 1\". \n This allows to traverse the list from tail to head, useful for zrevrange.\n4) This implementation is combined with dict data structure for fast search.\n\nSkip Lists are data structure that can be used in place of balanced trees. They\nare easier to implement and generally faster. This library uses redis skip lists to\nimplement SortedSet data types for Python.\n\nSortedSet is implemented in Python and C with high performance.\n\nHere is a few examples:\n```python\nfrom boost_collections.zskiplist.zset_node import ZsetNode\nfrom boost_collections.zskiplist.zset_obj import ZsetObj\nzset_obj = ZsetObj()\nelements = [ZsetNode('a', 1), ZsetNode('a', 2), ZsetNode('c', 2)]\n# multi elements added\nzset_obj.zadd(elements=elements)\n# multi elements added nx\nzset_obj.zadd(elements=elements, 'nx')\n# one element added\nzset_obj.zadd(elements=ZsetNode('d', 1))\n# zincrby\nzset_obj.zincrby(ZsetNode('a', 1), 'incr')\n# zcard\nzset_obj.zcard()\n# zscore\nzset_obj.zscore('a')\n# zrange\nzset_obj.zrange(0, -1, True)\n# zrevrange\nzset_obj.zrevrange(0, 1, True)\n# zrange_by_score\nzset_obj.zrange_by_score(1, 0, 2, 0)\n# zrevrange_by_score\nzset_obj.zrevrange_by_score(1, 0, 2, 0)\n```\n# Compatibility\n* Python 2.7, 3.5+\n\n# Installation\n```\npip install ratel\n```\nor\n```\nhttps://github.com/524243642/ratel\ncd ratel\npython setup.py install\n```\n\n\n# Time Complexity\nZsetObj Operations | Average Case\n-------------------- | ------------\nzadd | O(log N)\nzincrby | O(log N)\nzrem | O(log N)\nzscore | O(1)\nzcard | O(1)\nzrange | O(log(N) + M)\nzrevrange | O(log(N) + M)\nzfloor | O(log N)\nzlower | O(log N)\nzrange_by_score | O(log(N) + M)\nzrevrange_by_score | O(log(N) + M)\n\n# Release\n0.3.4 2018-12-04 zadd zincrby zrem zscore zcard zrange zrevrange\n\n0.4.0 2018-12-23 zfloor zlower\n\n0.4.1 2019-01-23 shields.io access\n\n0.5.0 2019-04-25 zrange_by_score zrevrange_by_score\n\n# License\nMIT\n\n# Contributing\nWelcome to feedback and improvements.Please submit a pull request!", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/524243642/ratel", "keywords": "ratel", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ratel", "package_url": "https://pypi.org/project/ratel/", "platform": "", "project_url": "https://pypi.org/project/ratel/", "project_urls": { "Homepage": "https://github.com/524243642/ratel" }, "release_url": "https://pypi.org/project/ratel/0.5.3/", "requires_dist": null, "requires_python": "", "summary": "Sorted data structure implementation by using skiplist and dict with Python and C", "version": "0.5.3" }, "last_serial": 5227247, "releases": { "0.2.19": [ { "comment_text": "", "digests": { "md5": "65d65af85e5ac76c43165bcc0a3cf392", "sha256": "95b944d13c66fcc7e22afcfa4dbe511f31ae71dd54e1482a5c747c50c7145538" }, "downloads": -1, "filename": "ratel-0.2.19.tar.gz", "has_sig": false, "md5_digest": "65d65af85e5ac76c43165bcc0a3cf392", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6361, "upload_time": "2018-11-28T08:42:31", "url": "https://files.pythonhosted.org/packages/83/ac/45a6734ce295759a02689c943856451f89b36f52bd2ddc72889cc127c56f/ratel-0.2.19.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "1c65ded3d9f9674c2871178bb4e82c05", "sha256": "0f4e90b2c81229180a1f8c478512bc9074faf39197e192923613f86c588282b9" }, "downloads": -1, "filename": "ratel-0.3.2.tar.gz", "has_sig": false, "md5_digest": "1c65ded3d9f9674c2871178bb4e82c05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11010, "upload_time": "2018-12-03T18:18:36", "url": "https://files.pythonhosted.org/packages/da/9d/fed9aa7152066adedff5645c81c417ed2489c314e3f1f4a5fac428e6908c/ratel-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "e547e6eb81a61c55988bed8fe0d1ac19", "sha256": "83d5428b21706e7249c15c9430853381fed336518a9bb191b67973e06d81b898" }, "downloads": -1, "filename": "ratel-0.3.3.tar.gz", "has_sig": false, "md5_digest": "e547e6eb81a61c55988bed8fe0d1ac19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11011, "upload_time": "2018-12-04T02:15:49", "url": "https://files.pythonhosted.org/packages/8e/cc/bd8e53bf673ecfb79e21633321534a0eaa0c1f5ffdc5ea2f0d0eaab650e7/ratel-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "c02aa1d80b8e5d609df6bd3c31b1c91b", "sha256": "0f44ce340d7c659725d6efe0f60edbc4558ea50b264e10ecaa4f938b9fc453db" }, "downloads": -1, "filename": "ratel-0.3.4.tar.gz", "has_sig": false, "md5_digest": "c02aa1d80b8e5d609df6bd3c31b1c91b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11086, "upload_time": "2018-12-13T10:18:03", "url": "https://files.pythonhosted.org/packages/ca/a0/14235fcd76da607dcee4448c624a059621f7c15d2d497a76068c2cf5a265/ratel-0.3.4.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ee6061f4f132f2ebd628b4edc7acf7b8", "sha256": "996299353173e113e800f26ae4d1b49cd21de5262c113054c214640bb0543e5c" }, "downloads": -1, "filename": "ratel-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ee6061f4f132f2ebd628b4edc7acf7b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11579, "upload_time": "2018-12-23T09:28:10", "url": "https://files.pythonhosted.org/packages/a3/e5/fc8023358e4fb56e7119e5e5f4118662fae6846ef772bbdcfb6185e01eb7/ratel-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "47723cd5f3826a6282b5242b485fd852", "sha256": "f1e895881f9295a5df9e0a7db6333a3f58ae0d733dd94fb78e14603288cca8a0" }, "downloads": -1, "filename": "ratel-0.4.1.tar.gz", "has_sig": false, "md5_digest": "47723cd5f3826a6282b5242b485fd852", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11785, "upload_time": "2019-01-23T03:15:35", "url": "https://files.pythonhosted.org/packages/5b/4a/521b8184b88fdd853a337edd6f190673a5977598acdb10caaea2a5a4701e/ratel-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "6f3a3c4eb9c477c788504c4f0148d446", "sha256": "63a65fccf7d497b4ad63e987b09bdfd477a87a77c67678f7b830f9bf1d47a354" }, "downloads": -1, "filename": "ratel-0.5.0.tar.gz", "has_sig": false, "md5_digest": "6f3a3c4eb9c477c788504c4f0148d446", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12915, "upload_time": "2019-04-25T06:26:23", "url": "https://files.pythonhosted.org/packages/5c/a8/5a849b8a241ba5ab892963b44a9251088fc161eb71a67c97308c29860027/ratel-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "76d1b6824b94c0e1309aa92e34f09cb9", "sha256": "4cfd047d89807b9ce17d62e12c3e6902c077d1ad5f7f8b11a2bd47df10305839" }, "downloads": -1, "filename": "ratel-0.5.1.tar.gz", "has_sig": false, "md5_digest": "76d1b6824b94c0e1309aa92e34f09cb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12909, "upload_time": "2019-04-25T06:43:34", "url": "https://files.pythonhosted.org/packages/1e/4e/e0cbe6dcb3404a76ff4e0eb3ca6737c5c2bbc0f1c41a5a978780035b13d0/ratel-0.5.1.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "3ce5bc329f0f29b43b2b04672b822e50", "sha256": "3cca4bc30aabd57ea89aa836f8cd67aa5c9f455819dcac128f50cd15cdf51b7b" }, "downloads": -1, "filename": "ratel-0.5.3.tar.gz", "has_sig": false, "md5_digest": "3ce5bc329f0f29b43b2b04672b822e50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12908, "upload_time": "2019-04-25T13:15:08", "url": "https://files.pythonhosted.org/packages/a5/b9/b48cb1cda004cfed1c16a9fe6f6fe1ae205c162d77349b38e1ae079abccf/ratel-0.5.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3ce5bc329f0f29b43b2b04672b822e50", "sha256": "3cca4bc30aabd57ea89aa836f8cd67aa5c9f455819dcac128f50cd15cdf51b7b" }, "downloads": -1, "filename": "ratel-0.5.3.tar.gz", "has_sig": false, "md5_digest": "3ce5bc329f0f29b43b2b04672b822e50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12908, "upload_time": "2019-04-25T13:15:08", "url": "https://files.pythonhosted.org/packages/a5/b9/b48cb1cda004cfed1c16a9fe6f6fe1ae205c162d77349b38e1ae079abccf/ratel-0.5.3.tar.gz" } ] }