Python case insensitive dictionary
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CaseInsensitiveDict
tests import paths Sep 18, 2015
.travis.yml test suite Sep 17, 2015
LICENSE fixed copyright Mar 20, 2016
README.rst added wheel info Sep 19, 2015
setup.cfg packaging Sep 17, 2015
setup.py supporting pypy Sep 18, 2015

README.rst

Python case insensitive dictionary

https://api.travis-ci.org/tivvit/python-case-insensitive-dict.svg?branch=master

  • implements all standard dictionary methods
  • supports nested dicts
  • this implementation does not preserve original key case

Install

pip install CaseInsensitiveDict

Example

from CaseInsensitiveDict import CaseInsensitiveDict

cid = CaseInsensitiveDict({"A": {"A": 1}, "B": 2, "c": 3})

print cid["A"] # >>> {'a': 1}
print cid["a"] # >>> {'a': 1}
print cid["A"]["a"] # >>> 1
print cid["b"] # >>> 2
print cid["C"] # >>> 3

Development

Feel free to contribute.

Copyright and License

2015 Vít Listík

Released under MIT licence