nocasedict
A case-insensitive list for Python
Decision gist · record as of 2026-08-14
Yes, if you need case-insensitive dictionary semantics with key-case preservation. The package is actively maintained, production-stable, has low install friction, and covers a genuine use case not well-served by existing alternatives. The LGPL-2.1-or-later license requires attention in proprietary projects but poses no barrier for open-source work.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (typing-extensions).
- Actively maintained with recent commits and production-stable status across modern Python versions.
License · maintenance · safety
LGPL-2.1-or-later (copyleft) — Licensed under LGPL-2.1-or-later (copyleft). Derivative works and modifications must be released under compatible terms; suitable for open-source projects but requires care in proprietary contexts.
last release 2026-01-04 (222 days) · last repo commit 2026-07-20 · 4 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 107,769 downloads/mo, #12,598 on PyPI
Alternatives
Verify before relying
pip install nocasedict
from nocasedict import NocaseDict
dict1 = NocaseDict({'Alpha': 1, 'Beta': 2})
print(dict1['ALPHA']) # Returns 1
print(dict1) # Prints NocaseDict({'Alpha': 1, 'Beta': 2})- Performance characteristics compared to standard dict for large datasets
- Behavior when keys differ only in case (e.g., 'Alpha' vs 'ALPHA' as separate inserts)
What it is and what it does
NocaseDict is an ordered dictionary implementation that performs case-insensitive key lookups while preserving the original lexical case of keys as they were inserted. When you access a key, the lookup is case-insensitive (so 'ALPHA', 'alpha', and 'Alpha' all retrieve the same value), but when you print or iterate the dictionary, keys appear in their original form.
The package implements the full Python 3.14 dict API on all supported Python versions (3.9+), with customizable casefolding behavior via str.casefold() for unicode strings and bytes.lower() for byte strings by default. It also provides mixin classes for adding hashability and attribute-based key access, making it suitable for scenarios where case-insensitive matching is needed without sacrificing the ability to preserve the original key format.
Use it for
- HTTP header handling where header names are case-insensitive but original casing should be preserved in responses
- Configuration file parsing where option names are matched case-insensitively but displayed in their original form
- API parameter matching where user input may vary in case but should map to canonical keys
- Database column name lookups where case-insensitive matching is needed but original column names must be retained
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need case-insensitive dictionary semantics with key-case preservation.
The package is actively maintained, production-stable, has low install friction, and covers a genuine use case not well-served by existing alternatives. The LGPL-2.1-or-later license requires attention in proprietary projects but poses no barrier for open-source work.
Install
nocasedict on PyPI
Before you install
Low install friction with a single runtime dependency (typing-extensions). Actively maintained with recent commits and production-stable status across modern Python versions.
License in practice
Licensed under LGPL-2.1-or-later (copyleft). Derivative works and modifications must be released under compatible terms; suitable for open-source projects but requires care in proprietary contexts.
Quickstart
pip install nocasedict
from nocasedict import NocaseDict
dict1 = NocaseDict({'Alpha': 1, 'Beta': 2})
print(dict1['ALPHA']) # Returns 1
print(dict1) # Prints NocaseDict({'Alpha': 1, 'Beta': 2})
Verify before relying
- Performance characteristics compared to standard dict for large datasets
- Behavior when keys differ only in case (e.g., 'Alpha' vs 'ALPHA' as separate inserts)
Package facts
| License | LGPL-2.1-or-later copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping-extensions |
| Maintenance | Actively maintained 222 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 107,769 / month, #12,598 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: nocasedict-2.2.0-py3-none-any.whl
Tags
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 › “case-insensitive dictionary”
- nocasedictA case-insensitive ordered dictionary that preserves the original…
- jaraco.collectionsProvides specialized collection classes that extend Python's standard…
- multidictMultidict is a dict-like container that allows multiple values per…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also multidict · orderedmultidict · ordereddict · lexid · ordered-set · sort-lines · regex · jaraco.collections · expiringdict · sortedcollections