od
Shorthand syntax for building OrderedDicts
What it is and what it does
The od package is a thin wrapper that adds syntactic sugar for creating OrderedDict instances. Instead of the verbose OrderedDict constructor, you can use bracket notation with colon-separated pairs: od["key": "value", "key2": "value2"]. It also works as a drop-in replacement for the standard OrderedDict constructor.
The package has no runtime dependencies and installs cleanly on Python 3.5 through 3.10. However, it has been abandoned and receives no maintenance. Given that regular Python dicts have preserved insertion order since Python 3.7, the practical need for this convenience wrapper has diminished significantly.
Use it for:
- Writing code that requires insertion-order preservation on Python versions before 3.7 where dict ordering was not guaranteed.
- Reducing verbosity when creating OrderedDict instances in codebases that heavily use ordered dictionaries.
- Legacy projects that depend on this package and need to maintain compatibility without refactoring.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides shorthand syntax to create OrderedDict instances using bracket notation with colon-separated key-value pairs, or as a regular constructor.
No. While the package is permissive (MIT) and installs cleanly, it has been abandoned with no maintenance. More importantly, since Python 3.7 regular dicts preserve insertion order, the core problem this package solves no longer exists. For modern Python code, use dict directly or stick with collections.OrderedDict if you specifically need its other features. Only install if you're maintaining legacy code that already depends on it.
Install
od on PyPI
pip
pip install oduv
uv add odpoetry
poetry add odInstalling od
Before you install
Installation is straightforward with no runtime dependencies. However, the package has been abandoned since its last commit on 2022-05-30 and will not receive updates or maintenance.
License in practice
Licensed under MIT (permissive), so you can use it freely in commercial or private projects with minimal restrictions.
Quickstart
pip install od
import od
# Shorthand syntax
result = od["cat": "fish", "mouse": "cheese"]
# Or as regular constructor
result = od([("cat", "fish"), ("mouse", "cheese")])
Verify before relying
- Whether the shorthand syntax works reliably with Python 3.10 and later versions, or if future releases may break compatibility.
- Whether OrderedDict's role in modern Python (dict preserves insertion order since 3.7) affects the practical value of this package.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,649 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 206,080/month — #9,577 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: od-2.0.2-py3-none-any.whl
Keywords: OrderedDict, od, syntactic sugar
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ordereddictProvides an OrderedDict implementation for…
permissive · top 15,000 on PyPI
querystring-parserParses URL query strings and POST data into…
permissive · top 5,000 on PyPI
attrdictProvides dictionary-like objects that allow…
permissive · top 5,000 on PyPI
vdfSerializes and deserializes Valve's KeyValue…
permissive · top 15,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI
asciitreeRenders tree data structures as formatted ASCII…
permissive · top 5,000 on PyPI
addictProvides a dictionary subclass that allows…
permissive · top 5,000 on PyPI
stringparserExtracts values from strings using…
permissive · top 15,000 on PyPI
python-boxBox wraps Python dictionaries to enable…
permissive · top 5,000 on PyPI
python-benedictA dict subclass that adds dot-notation access,…
permissive · top 5,000 on PyPI