{"id":32177453,"url":"https://github.com/mlenzen/collections-extended","last_synced_at":"2025-10-21T20:06:47.277Z","repository":{"id":10114510,"uuid":"12181352","full_name":"mlenzen/collections-extended","owner":"mlenzen","description":"Extra Python Collections - bags (multisets), setlists (unique list / indexed set), RangeMap and IndexedDict","archived":false,"fork":false,"pushed_at":"2023-03-12T22:44:13.000Z","size":1105,"stargazers_count":46,"open_issues_count":21,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T21:36:30.946Z","etag":null,"topics":["collections","data-structures","python"],"latest_commit_sha":null,"homepage":"http://collections-extended.lenzm.net/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlenzen.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-17T15:56:42.000Z","updated_at":"2024-12-30T22:21:31.000Z","dependencies_parsed_at":"2024-06-18T19:50:30.382Z","dependency_job_id":"c2f0bf7a-836f-4287-bc72-93d60baf5194","html_url":"https://github.com/mlenzen/collections-extended","commit_stats":{"total_commits":530,"total_committers":7,"mean_commits":75.71428571428571,"dds":"0.015094339622641506","last_synced_commit":"a1dbe7c771bfa07f3cef9889a2f8e40ae84e2d2b"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/mlenzen/collections-extended","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlenzen%2Fcollections-extended","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlenzen%2Fcollections-extended/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlenzen%2Fcollections-extended/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlenzen%2Fcollections-extended/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlenzen","download_url":"https://codeload.github.com/mlenzen/collections-extended/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlenzen%2Fcollections-extended/sbom","scorecard":{"id":653279,"data":{"date":"2025-08-11","repo":{"name":"github.com/mlenzen/collections-extended","commit":"a1dbe7c771bfa07f3cef9889a2f8e40ae84e2d2b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-package.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/mlenzen/collections-extended/python-package.yml/master?enable=pin","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"20 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T14:02:58.201Z","repository_id":10114510,"created_at":"2025-08-21T14:02:58.201Z","updated_at":"2025-08-21T14:02:58.201Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325300,"owners_count":26311419,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["collections","data-structures","python"],"created_at":"2025-10-21T20:06:45.899Z","updated_at":"2025-10-21T20:06:47.269Z","avatar_url":"https://github.com/mlenzen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"README\n######\n\n.. image:: https://coveralls.io/repos/github/mlenzen/collections-extended/badge.svg?branch=master\n\t:target: https://coveralls.io/github/mlenzen/collections-extended?branch=master\n\t:alt: Coverage\n\n\n.. image:: https://pepy.tech/badge/collections-extended/week\n\t:target: https://pepy.tech/project/collections-extended/\n\t:alt: Downloads\n\n\nDocumentation:\n\thttps://collections-extended.lenzm.net/\nGitHub:\n\thttps://github.com/mlenzen/collections-extended\nPyPI:\n\thttps://pypi.python.org/pypi/collections-extended\n\nOverview\n========\n\n``collections_extended`` is a pure Python module with no dependencies providing\nextra collections. The new collections include\nbags AKA **multisets**,\nsetlists AKA **unique lists** or **ordered sets**,\na ``bijection``,\na ``RangeMap`` which is a mapping from ranges to values, and\nan ``IndexedDict`` class.\nThere are also frozen (hashable) varieties of bags and setlists.\n\nCompatible with and tested against CPython 3.6, 3.7, 3.8, 3.9, 3.10, PyPy3.6, PyPy3.7 \u0026 PyPy3.8.\n\nGetting Started\n===============\n\n.. code-block:: python\n\n\t\u003e\u003e\u003e from collections_extended import bag, setlist, bijection, RangeMap, IndexedDict\n\t\u003e\u003e\u003e from datetime import date\n\t\u003e\u003e\u003e b = bag('abracadabra')\n\t\u003e\u003e\u003e b.count('a')\n\t5\n\t\u003e\u003e\u003e b.remove('a')\n\t\u003e\u003e\u003e b.count('a')\n\t4\n\t\u003e\u003e\u003e 'a' in b\n\tTrue\n\t\u003e\u003e\u003e b.count('d')\n\t1\n\t\u003e\u003e\u003e b.remove('d')\n\t\u003e\u003e\u003e b.count('d')\n\t0\n\t\u003e\u003e\u003e 'd' in b\n\tFalse\n\n\t\u003e\u003e\u003e sl = setlist('abracadabra')\n\t\u003e\u003e\u003e sl\n\tsetlist(('a', 'b', 'r', 'c', 'd'))\n\t\u003e\u003e\u003e sl[3]\n\t'c'\n\t\u003e\u003e\u003e sl[-1]\n\t'd'\n\t\u003e\u003e\u003e 'r' in sl  # testing for inclusion is fast\n\tTrue\n\t\u003e\u003e\u003e sl.index('d')  # so is finding the index of an element\n\t4\n\t\u003e\u003e\u003e sl.insert(1, 'd')  # inserting an element already in raises a ValueError\n\tTraceback (most recent call last):\n\t...\n\t\traise ValueError\n\tValueError\n\t\u003e\u003e\u003e sl.index('d')\n\t4\n\n\t\u003e\u003e\u003e bij = bijection({'a': 1, 'b': 2, 'c': 3})\n\t\u003e\u003e\u003e bij.inverse[2]\n\t'b'\n\t\u003e\u003e\u003e bij['a'] = 2\n\t\u003e\u003e\u003e bij == bijection({'a': 2, 'c': 3})\n\tTrue\n\t\u003e\u003e\u003e bij.inverse[1] = 'a'\n\t\u003e\u003e\u003e bij == bijection({'a': 1, 'c': 3})\n\tTrue\n\n\t\u003e\u003e\u003e version = RangeMap()\n\t\u003e\u003e\u003e version[date(2017, 10, 20): date(2017, 10, 27)] = '0.10.1'\n\t\u003e\u003e\u003e version[date(2017, 10, 27): date(2018, 2, 14)] = '1.0.0'\n\t\u003e\u003e\u003e version[date(2018, 2, 14):] = '1.0.1'\n\t\u003e\u003e\u003e version[date(2017, 10, 24)]\n\t'0.10.1'\n\t\u003e\u003e\u003e version[date(2018, 7, 1)]\n\t'1.0.1'\n\t\u003e\u003e\u003e version[date(2018, 6, 30):] = '1.0.2'\n\t\u003e\u003e\u003e version[date(2018, 7, 1)]\n\t'1.0.2'\n\n\t\u003e\u003e\u003e idict = IndexedDict()\n\t\u003e\u003e\u003e idict['a'] = \"A\"\n\t\u003e\u003e\u003e idict['b'] = \"B\"\n\t\u003e\u003e\u003e idict['c'] = \"C\"\n\t\u003e\u003e\u003e idict.get(key='a')\n\t'A'\n\t\u003e\u003e\u003e idict.get(index=2)\n\t'C'\n\t\u003e\u003e\u003e idict.index('b')\n\t1\n\nInstallation\n============\n\n``pip install collections-extended``\n\nUsage\n=====\n\t``from collections_extended import bag, frozenbag, setlist, frozensetlist, bijection``\n\nNew Collections\n===============\n\nThere are seven new collections provided:\n\nBags\n----\nbag\n\tThis is a bag AKA multiset.\nfrozenbag\n\tThis is a frozen (hashable) version of a bag.\n\nSetlists\n--------\nsetlist\n\tAn ordered set or a list of unique elements depending on how you look at it.\nfrozensetlist\n\tThis is a frozen (hashable) version of a setlist.\n\nMappings\n--------\nbijection\n\tA one-to-one mapping.\nRangeMap\n\tA mapping from ranges (of numbers/dates/etc)\nIndexedDict\n\tA mapping that keeps insertion order and allows access by index.\n\nPython 2\n--------\n\nThe package no longer supports Python 2. The last version to support\nPython 2.7, 3.4 \u0026 3.5 was 1.0. No new feature releases will be done for 1.x but\nany significant bugs that come up may be fixed.\n\n:Author: Michael Lenzen\n:Copyright: 2022 Michael Lenzen\n:License: Apache License, Version 2.0\n:Project Homepage: https://github.com/mlenzen/collections-extended\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlenzen%2Fcollections-extended","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlenzen%2Fcollections-extended","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlenzen%2Fcollections-extended/lists"}