$npx skillfedfor your agent

ordered-set

An OrderedSet is a custom MutableSet that remembers its order, so that every

With conditionsPyPI Released Jan 202241.2M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — ordered_set-4.1.0-py3-none-any.whl
v4.1.0 · released 2022-01-26 · Python >=3.7

Yes, if you need ordered set semantics with index access and can tolerate dormant maintenance. The package is stable, has no dependencies, installs easily, and solves a real gap between sets and lists. Not recommended if you require active maintenance or expect frequent updates to track Python evolution.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction installation as a pure-Python wheel with no runtime dependencies.
  • Maintenance is dormant—last release was 2022-01-26 and no commits since 2024-08-09—but the package is marked Production/Stable and has been stable since its 2013 initial release.

License · maintenance · safety

permissive license (permissive) — Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without restriction or obligation to share modifications.

last release 2022-01-26 (1661 days) · last repo commit 2024-08-09 · 230 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 41,161,286 downloads/mo, #675 on PyPI

Verify before relying

pip install ordered-set

from ordered_set import OrderedSet

letters = OrderedSet('abracadabra')
print(letters.index('r'))  # 2
print(letters[2])  # 'r'
  • Whether dormant maintenance status affects long-term compatibility with future Python versions beyond 3.10
  • Performance characteristics for very large sets compared to built-in dict-based ordered collections in Python 3.7+
Same gist for agents: .md · .json

What it is and what it does

OrderedSet is a data structure that behaves like a Python set—supporting membership testing, union, intersection, and difference operations—while also preserving insertion order and providing list-like index-based access. You can look up an element's position, retrieve an element by index, and perform fancy indexing with multiple indices at once.

It trades O(1) deletion for O(1) index lookups by storing content in a standard list rather than a linked list. This makes it useful in data science workflows where you need bidirectional mapping between sparse vocabularies and dense index numbers, and in cases where you want set semantics but also need to know or access elements by position. It implements standard collection protocols including pickling and generic type annotations.

Use it for

  • Build a vocabulary index for NLP or machine learning that maps words to dense integer IDs while preserving order
  • Deduplicate a sequence while keeping insertion order and enabling fast index-based lookups
  • Implement a cache or registry where you need both O(1) membership testing and positional access
  • Replace pandas.Index for lightweight ordered unique collections without the pandas dependency

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need ordered set semantics with index access and can tolerate dormant maintenance.

The package is stable, has no dependencies, installs easily, and solves a real gap between sets and lists. Not recommended if you require active maintenance or expect frequent updates to track Python evolution.

Install

ordered-set on PyPI

Before you install

Low friction installation as a pure-Python wheel with no runtime dependencies. Maintenance is dormant—last release was 2022-01-26 and no commits since 2024-08-09—but the package is marked Production/Stable and has been stable since its 2013 initial release.

License in practice

Licensed under MIT (permissive), so you can use it freely in commercial and open-source projects without restriction or obligation to share modifications.

Quickstart

pip install ordered-set

from ordered_set import OrderedSet

letters = OrderedSet('abracadabra')
print(letters.index('r'))  # 2
print(letters[2])  # 'r'

Verify before relying

  • Whether dormant maintenance status affects long-term compatibility with future Python versions beyond 3.10
  • Performance characteristics for very large sets compared to built-in dict-based ordered collections in Python 3.7+

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 1,661 days since the last release
Last repo commit
First released
Downloads41,161,286 / month, #675 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: ordered_set-4.1.0-py3-none-any.whl

Tags

Capabilities
ordered set data structureset with index accessordered collection pythonmutable ordered setset that preserves orderindexed set implementationlist-set hybrid
Topics
data-structurecollections

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “ordered set data structure”

  • ordered-setOrderedSet is a mutable collection that combines set semantics with…
  • orderly-setProvides multiple ordered set implementations (OrderedSet, StableSet,…
  • red-black-tree-modProvides Python implementations of red-black trees with optional…

Give your agent the search over MCP, or paste the wish link into any chat.

Similar packages

orderly-set With conditions
PyPI · Software Development · released Jul 2025

Provides multiple ordered set implementations (OrderedSet, StableSet, OrderlySet, SortedSet) that maintain insertion order while supporting set operations like union, intersection, and difference.

MITpure Python · 3.8+aging
59.7Mdownloads / mo
frozenlist Worth it
PyPI · released Oct 2025

Provides a list-like container that starts mutable but can be frozen to prevent further modifications, and becomes hashable once frozen.

Install it if you need a hashable list-like container or want to enforce immutability after initialization.

permissive licensepure Python · 3.9+
554.2Mdownloads / mo
ordereddict Skip
PyPI · Software Development · released Oct 2010

Provides an OrderedDict implementation for Python 2.4–2.6, preserving insertion order in a dictionary-like object with O(1) amortized insertion, deletion, and lookup performance.

MITbuilds from sourceabandoned
215.9Kdownloads / mo
sortedcollections With conditions
PyPI · Software Development · released Jan 2021

Provides specialized sorted collection data structures (dictionaries, sets, lists) that maintain order and support efficient indexed access and value-based sorting, built on top of sortedcontainers.

Apache-2.0pure Pythonabandoned
343.5Kdownloads / mo
collections-extended With conditions
PyPI · Software Development · released Jan 2022

Provides four specialized collection types—bag (multiset), setlist (ordered set), bijection (one-to-one mapping), and IndexedDict (ordered dict with index access)—as pure Python implementations with no external dependencies.

Apache-2.0pure Pythonabandoned
731.8Kdownloads / mo
orderedmultidict With conditions
PyPI · Libraries · released Nov 2025

orderedmultidict provides a dictionary that stores multiple values per key while preserving insertion order, with an API compatible with Python's built-in dict.

permissive licensepure Pythonaging
6.0Mdownloads / mo

See also llist · multiset · slicerator · nocasedict