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 dict but it can have several values for the same key.
multidict has four multidict classes: MultiDict, MultiDictProxy, CIMultiDict and CIMultiDictProxy.
Immutable proxies (MultiDictProxy and CIMultiDictProxy) provide a dynamic view on 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 assumes the keys are case insensitive, e.g.:
>>> dct = CIMultiDict(a='val') >>> 'A' in dct True >>> dct['A'] 'val'
Keys should be str instances.
The library has optional Cython optimization for sake of speed.
License
Apache 2
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 Distributions
Built Distributions
Hashes for multidict-1.1.0a2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9baa5fdfd852b70b65570eed1acc24469727a5deeadb7afbd1f1adbadc451824 |
|
MD5 | 3d56e5597a3dfafb627f1e5eaa0b45cd |
|
BLAKE2b-256 | 4fc8f0c4fdaa14a4ca798d2249f2f8d96fa0ff1bd3cb3256cfcb7ea61a90344d |
Hashes for multidict-1.1.0a2-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9cf90fc4b6e1bb1123a3d7649ad33f8bc68d9a1c8d2175a15e52996edf5641 |
|
MD5 | d39cccaae9da38202f335d1bf195748e |
|
BLAKE2b-256 | 72f5525ca5f566c5474921d59a427f9715128230c7b24520c0841f6a8d04c2db |
Hashes for multidict-1.1.0a2-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e80ad1b2e732eda266fc85b9a7ff42b638d838fae061c826645fc5d9f4a5486 |
|
MD5 | 70e8fa8186e9554ed612e665b08843c7 |
|
BLAKE2b-256 | 6d5144551b158f8710cdf96c0536641d3fb22f723bc03237a5b4942875f7a28b |
Hashes for multidict-1.1.0a2-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb5a9c45d88e45c9483147588974cd9874c3c8199dd49a4584287308ca289dba |
|
MD5 | 27a4a90e6314ae4affe78a007412c88e |
|
BLAKE2b-256 | 081c50922bafa1b18c4f64beae8019e50611ccc995f88e0db87bf31f4f732b32 |