ordered-set
An OrderedSet is a custom MutableSet that remembers its order, so that every
Install
ordered-set on PyPI
pip
pip install ordered-setuv
uv add ordered-setpoetry
poetry add ordered-setPackage 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
About ordered-set
from the package's own PyPI description — quoted content, verbatim
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+.
Similar packages
permissive · top 1,000 on PyPI
cleopermissive · top 1,000 on PyPI
more-itertoolspermissive · top 1,000 on PyPI
frozenlistpermissive · top 100 on PyPI
jmespathpermissive · top 100 on PyPI
multidictpermissive · top 100 on PyPI
fastcorepermissive · top 1,000 on PyPI
deltalakepermissive · top 1,000 on PyPI
typing-inspectpermissive · top 1,000 on PyPI
Unidecodecopyleft · top 1,000 on PyPI