Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
docs/ | H | 03-May-2022 | - | 1,374 | 842 | |
multidict/ | H | 03-Oct-2021 | - | 4,657 | 3,778 | |
multidict.egg-info/ | H | 03-May-2022 | - | 133 | 97 | |
tests/ | H | 03-May-2022 | - | 2,046 | 1,508 | |
CHANGES.rst | H A D | 03-Oct-2021 | 2.1 KiB | 91 | 56 | |
LICENSE | H A D | 03-Oct-2021 | 608 | 14 | 10 | |
MANIFEST.in | H A D | 03-Oct-2021 | 277 | 15 | 14 | |
Makefile | H A D | 03-Oct-2021 | 2.4 KiB | 109 | 82 | |
PKG-INFO | H A D | 03-Oct-2021 | 4.1 KiB | 133 | 97 | |
README.rst | H A D | 03-Oct-2021 | 2.9 KiB | 104 | 70 | |
pyproject.toml | H A D | 03-Oct-2021 | 397 | 16 | 12 | |
setup.cfg | H A D | 03-Oct-2021 | 779 | 40 | 30 | |
setup.py | H A D | 03-Oct-2021 | 2.6 KiB | 98 | 84 |
README.rst
1========= 2multidict 3========= 4 5.. image:: https://github.com/aio-libs/multidict/workflows/CI/badge.svg 6 :target: https://github.com/aio-libs/multidict/actions?query=workflow%3ACI 7 :alt: GitHub status for master branch 8 9.. image:: https://codecov.io/gh/aio-libs/multidict/branch/master/graph/badge.svg 10 :target: https://codecov.io/gh/aio-libs/multidict 11 :alt: Coverage metrics 12 13.. image:: https://img.shields.io/pypi/v/multidict.svg 14 :target: https://pypi.org/project/multidict 15 :alt: PyPI 16 17.. image:: https://readthedocs.org/projects/multidict/badge/?version=latest 18 :target: http://multidict.readthedocs.org/en/latest/?badge=latest 19 :alt: Documentationb 20 21.. image:: https://img.shields.io/pypi/pyversions/multidict.svg 22 :target: https://pypi.org/project/multidict 23 :alt: Python versions 24 25.. image:: https://badges.gitter.im/Join%20Chat.svg 26 :target: https://gitter.im/aio-libs/Lobby 27 :alt: Chat on Gitter 28 29Multidict is dict-like collection of *key-value pairs* where key 30might be occurred more than once in the container. 31 32Introduction 33------------ 34 35*HTTP Headers* and *URL query string* require specific data structure: 36*multidict*. It behaves mostly like a regular ``dict`` but it may have 37several *values* for the same *key* and *preserves insertion ordering*. 38 39The *key* is ``str`` (or ``istr`` for case-insensitive dictionaries). 40 41``multidict`` has four multidict classes: 42``MultiDict``, ``MultiDictProxy``, ``CIMultiDict`` 43and ``CIMultiDictProxy``. 44 45Immutable proxies (``MultiDictProxy`` and 46``CIMultiDictProxy``) provide a dynamic view for the 47proxied multidict, the view reflects underlying collection changes. They 48implement the ``collections.abc.Mapping`` interface. 49 50Regular mutable (``MultiDict`` and ``CIMultiDict``) classes 51implement ``collections.abc.MutableMapping`` and allows to change 52their own content. 53 54 55*Case insensitive* (``CIMultiDict`` and 56``CIMultiDictProxy``) ones assume the *keys* are case 57insensitive, e.g.:: 58 59 >>> dct = CIMultiDict(key='val') 60 >>> 'Key' in dct 61 True 62 >>> dct['Key'] 63 'val' 64 65*Keys* should be ``str`` or ``istr`` instances. 66 67The library has optional C Extensions for sake of speed. 68 69 70License 71------- 72 73Apache 2 74 75Library Installation 76-------------------- 77 78.. code-block:: bash 79 80 $ pip install multidict 81 82The library is Python 3 only! 83 84PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install 85``multidict`` on another operation system (or *Alpine Linux* inside a Docker) the 86Tarball will be used to compile the library from sources. It requires C compiler and 87Python headers installed. 88 89To skip the compilation please use `MULTIDICT_NO_EXTENSIONS` environment variable, 90e.g.: 91 92.. code-block:: bash 93 94 $ MULTIDICT_NO_EXTENSIONS=1 pip install multidict 95 96Please note, Pure Python (uncompiled) version is about 20-50 times slower depending on 97the usage scenario!!! 98 99 100 101Changelog 102--------- 103See `RTD page <http://multidict.readthedocs.org/en/latest/changes.html>`_. 104