multidict implementation
Project description
multidict
=========
.. image:: https://travis-ci.org/aio-libs/multidict.svg?branch=master
:target: https://travis-ci.org/aio-libs/multidict
:align: right
.. image:: https://codecov.io/gh/aio-libs/multidict/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aio-libs/multidict
.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/aio-libs/Lobby
:alt: Chat on Gitter
Multidicts are useful for working with HTTP headers, URL
query args etc.
The code was extracted from aiohttp_ library.
Introduction
------------
*HTTP Headers* and *URL query string* require specific data structure:
*multidict*. It behaves mostly like a regular ``dict`` but it may have
several *values* for the same *key* and *preserves insertion ordering*.
The *key* is ``str`` (or ``istr`` for case-insensitive dictionaries).
``multidict`` has four multidict classes:
``MultiDict``, ``MultiDictProxy``, ``CIMultiDict``
and ``CIMultiDictProxy``.
Immutable proxies (``MultiDictProxy`` and
``CIMultiDictProxy``) provide a dynamic view for the
proxied multidict, the view reflects underlying collection changes. They
implement the ``collections.abc.Mapping`` interface.
Regular mutable (``MultiDict`` and ``CIMultiDict``) classes
implement ``collections.abc.MutableMapping`` and allows to change
their own content.
*Case insensitive* (``CIMultiDict`` and
``CIMultiDictProxy``) ones assume the *keys* are case
insensitive, e.g.::
>>> dct = CIMultiDict(key='val')
>>> 'Key' in dct
True
>>> dct['Key']
'val'
*Keys* should be ``str`` or ``istr`` instances.
The library has optional Cython_ optimization for sake of speed.
License
-------
Apache 2
.. _aiohttp: https://github.com/KeepSafe/aiohttp
.. _Cython: http://cython.org/
3.1.3 (2017-07-14)
------------------
* Fix build
3.1.2 (2017-07-14)
------------------
* Fix type annotations
3.1.1 (2017-07-09)
------------------
* Fix #105: Remove memory leak in `istr` implementation
3.1.0 (2017-06-25)
------------------
* Fix #99: raise `RuntimeError` on dict iterations if the dict was changed
* Update `__init__.pyi` signatures
3.0.0 (2017-06-21)
------------------
* Refactor internal data structures: main dict operations are about
100% faster now.
* Preserve order on multidict updates #68
Updates are `md[key] = val` and `md.update(...)` calls.
Now **the last** entry is replaced with new key/value pair, all
previous occurrences are removed.
If key is not present in dictionary the pair is added to the end
* Force keys to `str` instances #88
* Implement `.popall(key[, default])` #84
* `.pop()` removes only first occurence, `.popone()` added #92
* Implement dict's version #86
* Proxies are not pickable anymore #77
2.1.7 (2017-05-29)
------------------
* Fix import warning on Python 3.6 #79
2.1.6 (2017-05-27)
------------------
* Rebuild the library for fixning missing `__spec__` attribute #79
2.1.5 (2017-05-13)
------------------
* Build Python 3.6 binary wheels
2.1.4 (2016-12-1)
------------------
* Remove LICENSE filename extension @ MANIFEST.in file #31
2.1.3 (2016-11-26)
------------------
* Add a fastpath for multidict extending by multidict
2.1.2 (2016-09-25)
------------------
* Fix `CIMultiDict.update()` for case of accepting `istr`
2.1.1 (2016-09-22)
------------------
* Fix `CIMultiDict` constructor for case of accepting `istr` #11
2.1.0 (2016-09-18)
------------------
* Allow to create proxy from proxy
* Add type hints (PEP-484)
2.0.1 (2016-08-02)
------------------
* Don't crash on `{} - MultiDict().keys()` and similar operations #6
2.0.0 (2016-07-28)
------------------
* Switch from uppercase approach for case-insensitive string to
`str.title()` #5
* Deprecase `upstr` class in favor of `istr` alias.
1.2.2 (2016-08-02)
------------------
* Don't crash on `{} - MultiDict().keys()` and similar operations #6
1.2.1 (2016-07-21)
------------------
* Don't expose `multidict.__version__`
1.2.0 (2016-07-16)
------------------
* Make `upstr(upstr('abc'))` much faster
1.1.0 (2016-07-06)
------------------
* Don't double-iterate during MultiDict initialization #3
* Fix CIMultiDict.pop: it is case insensitive now #1
* Provide manylinux wheels as well as Windows ones
1.0.3 (2016-03-24)
------------------
* Add missing MANIFEST.in
1.0.2 (2016-03-24)
------------------
* Fix setup build
1.0.0 (2016-02-19)
------------------
* Initial implementation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multidict-3.1.3.tar.gz.
File metadata
- Download URL: multidict-3.1.3.tar.gz
- Upload date:
- Size: 118.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
875f80a046e7799b40df4b015b8fc5dae91697936872a8d7362c909a02ec6d12
|
|
| MD5 |
2110f04c0cb5d38554a256229ed8eba9
|
|
| BLAKE2b-256 |
ebf39c3d916a9b83a4b6cff0843177f2940d5cc57835d4bc0bc781df352715c6
|
File details
Details for the file multidict-3.1.3-cp36-cp36m-win_amd64.whl.
File metadata
- Download URL: multidict-3.1.3-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 155.7 kB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fd1803328017d7cbce4ed45dadef0304b34dde9e90613e53b9b56f6a2bf22a2
|
|
| MD5 |
0b56b129a2eadeaeba3b18ae7bc77163
|
|
| BLAKE2b-256 |
4f7e8957580338b50650f1a5c91d460e8fc0c79d11a45c6e49b8a555bee97ae2
|
File details
Details for the file multidict-3.1.3-cp36-cp36m-win32.whl.
File metadata
- Download URL: multidict-3.1.3-cp36-cp36m-win32.whl
- Upload date:
- Size: 144.5 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94d77e7090791ddff7afc83995004e718d5f93880e2db11079b2b28ea86d83d2
|
|
| MD5 |
9d77a42249256ade573e7b8bf83d028c
|
|
| BLAKE2b-256 |
a4fa2eb3ef26631ad5c2f41a29a8a5ef7cf98f48d6530cf039a80a149ad50d0f
|
File details
Details for the file multidict-3.1.3-cp36-cp36m-manylinux1_x86_64.whl.
File metadata
- Download URL: multidict-3.1.3-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 398.2 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2edbef18399a93e34c8a12c5477c2494c7663859457a7e783bf597be0fa87f04
|
|
| MD5 |
5a3ed9bde01baccaebdef7aee35661a2
|
|
| BLAKE2b-256 |
f41433eb2f710f6a16bb210a5e1498b33b7642d73a296f934fdfa4cfe18f2393
|
File details
Details for the file multidict-3.1.3-cp36-cp36m-manylinux1_i686.whl.
File metadata
- Download URL: multidict-3.1.3-cp36-cp36m-manylinux1_i686.whl
- Upload date:
- Size: 372.3 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
111dd636cb2746fcad2628f067ddf244d15887526d58d3cba48db8868e836cb0
|
|
| MD5 |
8cdba1542033ffa74ae4b9107e90f353
|
|
| BLAKE2b-256 |
af9c2774ff9d7feefe8a1f5ac6c695e9ccb3368bc3c49d4ede5ed022dd94c3b0
|
File details
Details for the file multidict-3.1.3-cp35-cp35m-win_amd64.whl.
File metadata
- Download URL: multidict-3.1.3-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 154.6 kB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504137abc2ac6a6a8d19c00f0d451885cc36f047d9dc9aaf11238f9a3c63e95e
|
|
| MD5 |
9ba3aac7be9b0ee3a02150e84841f450
|
|
| BLAKE2b-256 |
251517ca94cec0b094efd0b556d97ccfee475eefb079d65b46f45f83a9f0f4e4
|
File details
Details for the file multidict-3.1.3-cp35-cp35m-win32.whl.
File metadata
- Download URL: multidict-3.1.3-cp35-cp35m-win32.whl
- Upload date:
- Size: 143.4 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f8657b1280dd8f0f1f8648c11a9acecd6942c80e7d9a5256a51ffd4d8d81269
|
|
| MD5 |
0405226b0d2d29cfd5b11eeac1a92072
|
|
| BLAKE2b-256 |
ecca248bd6dedbf19f46259d923d1fafdf1770009d684190187f4d570e822f82
|
File details
Details for the file multidict-3.1.3-cp35-cp35m-manylinux1_x86_64.whl.
File metadata
- Download URL: multidict-3.1.3-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 389.7 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c176bb980bbb8221c0876d18dabb263e78394de02172a3582d2dd461faa9422
|
|
| MD5 |
98ee823cef46749bfa7ad32e1c19998f
|
|
| BLAKE2b-256 |
bffe97144272a4cac341b9fa0a5712f0058a14cc7b67afa1aba4bfa6d0d5ad40
|
File details
Details for the file multidict-3.1.3-cp35-cp35m-manylinux1_i686.whl.
File metadata
- Download URL: multidict-3.1.3-cp35-cp35m-manylinux1_i686.whl
- Upload date:
- Size: 363.6 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476f0f8fee5e68298c28cf49b40af57f8d14db40fbdfb67261e2f4fdb6a321bc
|
|
| MD5 |
7658369d6b4f8b9d10575096e1958db9
|
|
| BLAKE2b-256 |
f74e2c57997eb9f0c3973742dbde9b7f715d0e725234affc068bab331032ef89
|
File details
Details for the file multidict-3.1.3-cp34-cp34m-manylinux1_x86_64.whl.
File metadata
- Download URL: multidict-3.1.3-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 385.4 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
247f4d2cae0d38efa53f6e3cd3e26c5eb3fdf704679972a1db4c7b74bd0c1b8d
|
|
| MD5 |
178e0088d41e338b57d4e9073ed68104
|
|
| BLAKE2b-256 |
c30043bc7c4321c8f20ba12ef530f841fb96cf46809329ce5b8222aa9aeff9eb
|
File details
Details for the file multidict-3.1.3-cp34-cp34m-manylinux1_i686.whl.
File metadata
- Download URL: multidict-3.1.3-cp34-cp34m-manylinux1_i686.whl
- Upload date:
- Size: 369.5 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
974df422dd16d183a68efacd5f68396ce733ae183545157ce66687141d6941bd
|
|
| MD5 |
2e3f3caeb7cc722be76f7bc28e046c50
|
|
| BLAKE2b-256 |
33804bd722d5802590305d2b12ddb9550dad1ed25856b300a9de5ef385c2a9ea
|