CaseInsensitiveDict (structures.py)

requests · auth, case-insensitive-dict, data-structures, dict-wrapper, infra

requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests.

# Source: https://github.com/psf/requests | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""
requests.structures
~~~~~~~~~~~~~~~~~~~

Data structures that power Requests.
"""

from __future__ import annotations

from collections import OrderedDict
from collections.abc import Iterable, Iterator, Mapping
from typing import Any, Generic, TypeVar, overload

from .compat import MutableMapping

_VT = TypeVar("_VT")
_D = TypeVar("_D")


class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]):
    """A case-insensitive ``dict``-like object.

    Implements all methods and operations of
    ``MutableMapping`` as well as dict's ``copy``. Also
    provides ``lower_items``.

    All

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key