multidict implementation
Project description
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
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
Hashes for multidict-2.1.6-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81f8372ad89bab6cbce90d4f98984a565b83068adfc251f460a5bfe3ef3c2650 |
|
MD5 | 289d29efb0df0bc32c3f48d3f064bf1b |
|
BLAKE2b-256 | 8d3b73d112c4f4f0150ab8c1e3f89ac70c798d676086974eabec1febd618e8c8 |
Hashes for multidict-2.1.6-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e64fb315cd76b5ff3439ceb8ccf65d4bd535fed3c00f07c77b379a61b0db9d8 |
|
MD5 | 65e66b1da414a20e624a205b131af9f8 |
|
BLAKE2b-256 | 95e96d5f8549e84f31b17101e3e5327dbd127413f9deb95140907d0bfb2d5f3c |
Hashes for multidict-2.1.6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd33f7ca9cd94d9986f697c331797fb53dbda0a9768a6015f3bf2830369dc632 |
|
MD5 | ab5efed79dc5415b3060040d7c8f7376 |
|
BLAKE2b-256 | 6ea2a78536a5ee6da5dd4c6be4270281d2e4ac94cbcc3933221adf5a3c254698 |
Hashes for multidict-2.1.6-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1fa5663e0cdc4f9548664cc8747d2b1a82f7f9098bb32583c5219143532921 |
|
MD5 | b4bf620b7f8d6b80fc2dcc7bb25e156b |
|
BLAKE2b-256 | 2ac98c4002aa0d321d6402d04238c35fbbb83489b8548076ff012dc88cfafce4 |
Hashes for multidict-2.1.6-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f4f43b5ab53610bb95989485278b2f65f8b73e32eae9b2265a7c98a8d457a6 |
|
MD5 | 01429ac35a7c43e5d0c7c5d709e444da |
|
BLAKE2b-256 | bbabd7afd4505b5aafe0bd9f2e335572a29ddb97dd16b4472c9131e0428db92b |
Hashes for multidict-2.1.6-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13384bf29704fac72ce6b555762d50ec5d1581065006a86a12de56fb8df7e2e9 |
|
MD5 | 3acd26818bc461059eb4485d360137ed |
|
BLAKE2b-256 | 3c17ef13196d90fbf3b49e74568902a2e70f1c2b49f7ef330618a943ce7ab44e |
Hashes for multidict-2.1.6-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d69fa4d4432576d6c26f0d04d7bb519fc317506236a275280c137265f7907013 |
|
MD5 | 3751bb9b079de87691d735c3256b6503 |
|
BLAKE2b-256 | 1e32ae27a4ed312fa6951ba3d67f8bb20a9cb4914d43940677cdf7f1f404e12e |
Hashes for multidict-2.1.6-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 634e57a6275eb911cd5517c728e7b57ac3a8951f8d3daa34efccf725c9f9e442 |
|
MD5 | b8323f52613c8a6330bba149fd9c99e1 |
|
BLAKE2b-256 | e4bfa666b1bf0eb35e2cc6cd7b704c85a36e3f36921e4b644850353e2e789fca |
Hashes for multidict-2.1.6-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbe9daf9925848cec1578d5c788680cb4753487cb0e7c8676a1f8f46694ae6e2 |
|
MD5 | cda333c9d2c4f8ef1a53df1abba0820c |
|
BLAKE2b-256 | 7f9ae1d5f88caacad94bc3770e6e45f3b128de0e37ac78999af02819b3c587fb |
Hashes for multidict-2.1.6-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c2fef6f6e8c810c8e1191ace6b60118c1a6e910b910cdc2de55f54297d75148 |
|
MD5 | 3c2f8abe020bf53a9140ec6ca74f2166 |
|
BLAKE2b-256 | f362695efe23c865803389a8bc85864944e92e7736b8be17cd2c8f484157a75a |
Hashes for multidict-2.1.6-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd3f4a13d3d81c287f2c363bf9d453ffbe348d16203080cfdb62d7a2497772a |
|
MD5 | ff676598bf77df604252b750ed911371 |
|
BLAKE2b-256 | 3a5bbf406021a5d97e34f7a4faa99a2529d51350d0048d36f1298270e3145987 |
Hashes for multidict-2.1.6-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebc472c13b56eac580e4b1681af4ee444223afc071b27cea766b672894957b82 |
|
MD5 | 131ed70a28c9dd7a196b5f2535702d58 |
|
BLAKE2b-256 | f920435763239777861632295fd70785397b05f46e5f27316543ea8012285fa9 |