Skip to main content

multidict implementation

Project description

Linux build @ Travis CI Windows build @ Appveyor Coverage metrics Chat on Gitter

Multidict is dict-like collection of key-value pairs where key might be occurred more than once in the container.

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

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

multidict-3.1.4a3.tar.gz (32.0 kB view details)

Uploaded Source

Built Distributions

multidict-3.1.4a3-cp36-cp36m-win_amd64.whl (173.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

multidict-3.1.4a3-cp36-cp36m-win32.whl (161.4 kB view details)

Uploaded CPython 3.6m Windows x86

multidict-3.1.4a3-cp36-cp36m-manylinux1_x86_64.whl (433.5 kB view details)

Uploaded CPython 3.6m

multidict-3.1.4a3-cp36-cp36m-manylinux1_i686.whl (403.9 kB view details)

Uploaded CPython 3.6m

multidict-3.1.4a3-cp35-cp35m-win_amd64.whl (172.4 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-3.1.4a3-cp35-cp35m-win32.whl (160.2 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-3.1.4a3-cp35-cp35m-manylinux1_x86_64.whl (424.2 kB view details)

Uploaded CPython 3.5m

multidict-3.1.4a3-cp35-cp35m-manylinux1_i686.whl (394.8 kB view details)

Uploaded CPython 3.5m

multidict-3.1.4a3-cp34-cp34m-win_amd64.whl (169.4 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-3.1.4a3-cp34-cp34m-win32.whl (160.7 kB view details)

Uploaded CPython 3.4m Windows x86

multidict-3.1.4a3-cp34-cp34m-manylinux1_x86_64.whl (430.9 kB view details)

Uploaded CPython 3.4m

multidict-3.1.4a3-cp34-cp34m-manylinux1_i686.whl (400.5 kB view details)

Uploaded CPython 3.4m

File details

Details for the file multidict-3.1.4a3.tar.gz.

File metadata

  • Download URL: multidict-3.1.4a3.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for multidict-3.1.4a3.tar.gz
Algorithm Hash digest
SHA256 96db09ec8ce763ebf2b981d01491895e9076408ebdc9971eadb9e8953382d7f2
MD5 5b45e3d427a870c364ed2b21bfc02ee2
BLAKE2b-256 37e3f7fe70024be82c628fbe0a3e43aad114dc0eba6f11d4580e69534350f675

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fe153f2265db3f4d388514ab3aa780ed13f8c557cc77e8c02fd4c9ba5f95ec09
MD5 41cc42e4e82572e0c84d8812bd4693ad
BLAKE2b-256 12604fd64f847d90ade1af1cd84f06d6b53a87636d055686f0d751aeecc752b4

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 010df40fcd3b7c33f69dd8f5f6847dc835f1d954ab6da8b6b9cd5312c284c695
MD5 70543f9a0774730eeeb0b60dc975fd0b
BLAKE2b-256 99b4a3852a8ef888fe98c671628d6df08ae2e90c63f73e78833cf008587f3776

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eb7fda97241b079769434516d51aa39a697da89e808daa24f6f9efb755dbc9f9
MD5 c0d9c7ad554bc6c13ddf0f397d7fecd7
BLAKE2b-256 f14b1b7bd888341dc40532e2661389ba2470874cd60a817f31f31aeb014faea5

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 95e1da77fd59c738e570b44a1883c69167f1164b635973c66f2ac83cc7b5c4a7
MD5 08f4b37d8873c5f97a2126f2acdb0c66
BLAKE2b-256 f17c21e3ddf085c554d5b5dd1402a4abd535509346e8ca1c67f3b9856ddb7034

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 5329a47df9b4b3c5795b5f9ac743fc1620882ff4cc246126b51ee92125f9badb
MD5 8d9ed5d40a30ef704603ce8b4293a0fc
BLAKE2b-256 bd0795418d6ad37654d22355f67af6f2525206ad8d3775cbfca7a16b88766cc9

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 28b2672eeac2ce85e000ffcdba9f20c595a3a06c18bd511463abfa10fd5f88b4
MD5 9985a36990c4f968c228d9e84f91b6ae
BLAKE2b-256 502ca643a27bc58af5ec1752ecfeb82dbcd7e20eb9d7fad73a4945673c3ad5d6

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a96dd4b12b70ac5f1c0f9b1d4c9a3c0297d3cd2e2304d3eea249314219126258
MD5 08ef8de612e925162ef6dac871981709
BLAKE2b-256 b6686544f17ef5b21654cba565887f064ede79fd24ed4df30585600654485f12

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 881fd8c2f7de76f5d56b29bd957ce11bd2ec09d8d26d157cb08d352ac9929bcf
MD5 be4a9788fe83a9107de3991a7dfc4767
BLAKE2b-256 a16e7059ea1751248798610a7b7c7c3f33d79678ba2c972995b4b194b2f13186

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 081ca5c8ba8e846b1ed0b58ac5ca9165dcf8c7e7457d1b1a47121f1d4aac3011
MD5 9d3412c1c6309e70df2fc48e818e8e4c
BLAKE2b-256 7c92520f1f3ebf9f78434f456bbb61fe9bdd76819768971d035cb1cf44f0ebcd

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 58945bb24248f8cee1aeb20483e04a9c198973c6cfe60cccbe729774a1e48cbc
MD5 3350ec5a1580b9773d88e6d14e4f8237
BLAKE2b-256 9158522c25da72cd317587df1a2028c2f2272e3071f0bbf6e72632b5e27c3c8f

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9a6c3f3feb17c00979f775362abb5e4ab232a05dbb1775cfa2fe03754f504c1b
MD5 6ed3ff3d7260dd610d44ede64ca3cea8
BLAKE2b-256 599e9ca9535f4375efc5f7e5e560ceabe6dd7631b977cb328c5a2625fc5c5164

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.1.4a3-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.1.4a3-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 cfb86f8e798d3113290ed1837163883d8ac66176f5b513b2e149327e3887fc68
MD5 c7bc98cd69be1136796bee235e1e6dee
BLAKE2b-256 2f91ec9cdb17f533cdbc343d58406914f59316479e0574c0537c3db16773cdab

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page