• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H03-May-2022-1,374842

multidict/H03-Oct-2021-4,6573,778

multidict.egg-info/H03-May-2022-13397

tests/H03-May-2022-2,0461,508

CHANGES.rstH A D03-Oct-20212.1 KiB9156

LICENSEH A D03-Oct-2021608 1410

MANIFEST.inH A D03-Oct-2021277 1514

MakefileH A D03-Oct-20212.4 KiB10982

PKG-INFOH A D03-Oct-20214.1 KiB13397

README.rstH A D03-Oct-20212.9 KiB10470

pyproject.tomlH A D03-Oct-2021397 1612

setup.cfgH A D03-Oct-2021779 4030

setup.pyH A D03-Oct-20212.6 KiB9884

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