skillfed

ordered-set

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

ordered-set Permissive license DORMANT 230 v4.1.0 released

Install

ordered-set on PyPI

pip

pip install ordered-set

uv

uv add ordered-set

poetry

poetry add ordered-set

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,660 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

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

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

About ordered-set

from the package's own PyPI description — quoted content, verbatim

Pypi (image)

An OrderedSet is a mutable data structure that is a hybrid of a list and a set. It remembers the order of its entries, and every entry has an index number that can be looked up.

Installation

ordered_set is available on PyPI and packaged as a wheel. You can list it as a dependency of your project, in whatever form that takes.

To install it into your current Python environment:

pip install ordered-set

To install the code for development, after checking out the repository:

pip install flit
flit install

Usage examples

An OrderedSet is created and used like a set:

>>> from ordered_set import OrderedSet

>>> letters = OrderedSet('abracadabra')

>>> letters
OrderedSet(['a', 'b', 'r', 'c', 'd'])

>>> 'r' in letters
True

It is efficient to find the index of an entry in an OrderedSet, or find an entry by its index. To help with this use case, the .add() method returns the index of the added item, whether it was already in the set or not.

>>> letters.index('r')
2

>>> letters[2]
'r'

>>> letters.add('r')
2...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

A mutable set that preserves insertion order and supports index-based access, combining set operations with list-like random lookup and slicing.

Installs cleanly with no runtime dependencies and is distributed as a wheel. Maintenance is dormant—last release was January 2022 and no commits since August 2024—but the package is marked Production/Stable and has been stable since 2013.

Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions.

Usage

pip install ordered-set

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

Requires Python 3.7 or later.

Verdict: A lightweight, dependency-free ordered set implementation suitable for production use. Dormant maintenance and a two-year gap since the last release are typical for a stable, feature-complete library, but users should be aware that bug fixes or compatibility updates may be slow. No known vulnerabilities.

Needs verification

  • Whether the dormant status reflects intentional stability or abandonment risk for future Python versions.
  • Performance characteristics compared to dict-based ordered collections in Python 3.7+.
ordered set data structureset with index accesspreserves insertion order setmutable ordered collectionset with list-like indexingbidirectional set mappingfancy indexing set

Similar packages