{"id":28559099,"url":"https://github.com/toastdriven/pyskip","last_synced_at":"2025-06-10T08:36:12.121Z","repository":{"id":11224850,"uuid":"13615766","full_name":"toastdriven/pyskip","owner":"toastdriven","description":"A pure Python skiplist implementation. For fun.","archived":false,"fork":false,"pushed_at":"2013-12-03T10:02:29.000Z","size":115,"stargazers_count":22,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-07T16:54:57.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toastdriven.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-16T10:04:33.000Z","updated_at":"2024-11-28T16:28:05.000Z","dependencies_parsed_at":"2022-08-29T17:32:00.687Z","dependency_job_id":null,"html_url":"https://github.com/toastdriven/pyskip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fpyskip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fpyskip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fpyskip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fpyskip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toastdriven","download_url":"https://codeload.github.com/toastdriven/pyskip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toastdriven%2Fpyskip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259039622,"owners_count":22796876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T08:36:04.108Z","updated_at":"2025-06-10T08:36:12.104Z","avatar_url":"https://github.com/toastdriven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"======\npyskip\n======\n\nA pure Python skiplist implementation.\n\nA skiplist provides a quickly searchable structure (like a balanced binary\ntree) that also updates fairly cheaply (no nasty rebalancing acts).\nIn other words, it's **awesome**.\n\nSee http://en.wikipedia.org/wiki/Skip_list for more information.\n\nWritten mostly an exercise for myself, it turns out skiplists are really useful.\nIt also comes with a (mostly-underdocumented) linked-list implementation\n(+ a sorted variant), if that's useful.\n\n\nRequirements\n============\n\n* Python 3.3+ (should work on Python 2.6+ as well, as well as PyPy 2.0+)\n* ``nose\u003e=1.30`` for running unittests\n\n\nUsage\n=====\n\nUsing it looks like:\n\n    \u003e\u003e\u003e import skiplist\n    \u003e\u003e\u003e skip = skiplist.Skiplist()\n    \u003e\u003e\u003e len(skip)\n    0\n    \u003e\u003e\u003e 6 in skip\n    False\n    \u003e\u003e\u003e skip.insert(0)\n    \u003e\u003e\u003e skip.insert(7)\n    \u003e\u003e\u003e skip.insert(3)\n    \u003e\u003e\u003e skip.insert(6)\n    \u003e\u003e\u003e skip.insert(245)\n    \u003e\u003e\u003e len(skip)\n    5\n    \u003e\u003e\u003e 6 in skip\n    True\n    \u003e\u003e\u003e skip.remove(245)\n    \u003e\u003e\u003e len(skip)\n    4\n    \u003e\u003e\u003e skip.find(3)\n    \u003cSkiplist: 3\u003e\n\n\nPerformance\n===========\n\nPerformance is alright, though I'm sure there's room for improvement. See the\n``bench.py`` script for more information.\n\n\nRunning Tests\n=============\n\nRun ``pip install nose`` (preferrably within a virtualenv) to install nose.\n\nThen run ``nosetests -s -v tests.py`` to exercise the full suite.\n\n\nTODO\n====\n\n* A more performant implementation of ``remove`` (still O(N))\n* More performance testing\n\n    * Loading data seems slow\n\n\nMeta\n====\n\n:author: Daniel Lindsley\n:license: BSD\n:version: 0.9.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Fpyskip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoastdriven%2Fpyskip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoastdriven%2Fpyskip/lists"}