class documentation

class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]):

View In Hierarchy

A case-insensitive ``dict``-like object. Implements all methods and operations of ``collections.MutableMapping`` as well as dict's ``copy``. Also provides ``lower_items``. All keys are expected to be strings. The structure remembers the case of the last key to be set, and ``iter(instance)``, ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()`` will contain case-sensitive keys. However, querying and contains testing is case insensitive:

    cid = CaseInsensitiveDict()
    cid['Accept'] = 'application/json'
    cid['aCCEPT'] == 'application/json'  # True
    list(cid) == ['Accept']  # True

For example, ``headers['content-encoding']`` will return the value of a ``'Content-Encoding'`` response header, regardless of how the header name was originally stored. If the constructor, ``.update``, or equality comparison operations are given keys that have equal ``.lower()``s, the behavior is undefined.

Method __delitem__ Undocumented
Method __eq__ Undocumented
Method __getitem__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method copy Undocumented
Method lower​_items Like iteritems(), but with all lowercase keys.
Instance Variable ​_store Undocumented
def __delitem__(self, key):

Undocumented

Parameters
key:strUndocumented
def __eq__(self, other):

Undocumented

Parameters
other:AnyUndocumented
Returns
boolUndocumented
def __getitem__(self, key):

Undocumented

Parameters
key:strUndocumented
Returns
_VTUndocumented
def __init__(self, data=None, **kwargs):

Undocumented

Parameters
data:Optional[Union[Mapping[str, _VT], Iterable[Tuple[str, _VT]]]]Undocumented
**kwargs:AnyUndocumented
def __iter__(self):

Undocumented

Returns
Iterator[str]Undocumented
def __len__(self):

Undocumented

Returns
intUndocumented
def __repr__(self):

Undocumented

Returns
strUndocumented
def __setitem__(self, key, value):

Undocumented

Parameters
key:strUndocumented
value:_VTUndocumented
def copy(self):

Undocumented

Returns
CaseInsensitiveDict[_VT]Undocumented
def lower_items(self):
Like iteritems(), but with all lowercase keys.
Returns
Iterator[Tuple[str, _VT]]Undocumented
_store: Dict[str, Tuple[str, _VT]] =

Undocumented