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.2.0 (2017-09-17)

  • Fix pickling (#134)

  • Fix equality check when other contains more keys (#124)

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.2.0.tar.gz (33.9 kB view details)

Uploaded Source

Built Distributions

multidict-3.2.0-cp36-cp36m-win_amd64.whl (175.8 kB view details)

Uploaded CPython 3.6m Windows x86-64

multidict-3.2.0-cp36-cp36m-win32.whl (163.1 kB view details)

Uploaded CPython 3.6m Windows x86

multidict-3.2.0-cp36-cp36m-manylinux1_x86_64.whl (438.2 kB view details)

Uploaded CPython 3.6m

multidict-3.2.0-cp36-cp36m-manylinux1_i686.whl (407.0 kB view details)

Uploaded CPython 3.6m

multidict-3.2.0-cp35-cp35m-win_amd64.whl (174.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-3.2.0-cp35-cp35m-win32.whl (162.0 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-3.2.0-cp35-cp35m-manylinux1_x86_64.whl (429.8 kB view details)

Uploaded CPython 3.5m

multidict-3.2.0-cp35-cp35m-manylinux1_i686.whl (398.4 kB view details)

Uploaded CPython 3.5m

multidict-3.2.0-cp34-cp34m-win_amd64.whl (171.3 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-3.2.0-cp34-cp34m-win32.whl (162.7 kB view details)

Uploaded CPython 3.4m Windows x86

multidict-3.2.0-cp34-cp34m-manylinux1_x86_64.whl (436.1 kB view details)

Uploaded CPython 3.4m

multidict-3.2.0-cp34-cp34m-manylinux1_i686.whl (406.0 kB view details)

Uploaded CPython 3.4m

File details

Details for the file multidict-3.2.0.tar.gz.

File metadata

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

File hashes

Hashes for multidict-3.2.0.tar.gz
Algorithm Hash digest
SHA256 e27a7a95317371c15ecda7206f6e8c144f10a337bb2c3e61b5176deafbb88cb2
MD5 a01da31ca1855557a1b2e053c933af2f
BLAKE2b-256 68a6d241f9d1ed5ca55a819329c2f98c6833a2d8f25463bc03c44039cd13639c

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 89de0034ab008d5e81ec3ec58fb31a8c751908d73e3d9650e0044da836a3f280
MD5 bfaab1099ddc56d6d639ebb062a71d9c
BLAKE2b-256 a11ee644b3de094187a1001a04c7ae1050c01ca907b475e6b6c24d97b264a200

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp36-cp36m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 7a1ff7659b1f198b61a4033bb253a6a36c846d7f1d9a0052b4881f27f5be7d6d
MD5 675b290f670f928fe65067742e7b43bd
BLAKE2b-256 73d8fbcf6015b03c2801e9c1b002e09b5eae184cd3edc35437d0e5837595286e

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ca1f02baba1ce89eda8bc5a9208c58510586d0608cc0f355b153b514ec888599
MD5 eb17156b4ee147e2cc7806163c9fa8e5
BLAKE2b-256 66cac922282227d397b9a6f4d726d5526b22cae644ec3e15984e3deb37514c05

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 68afb2e8dafdc8b687af9e38e77192d2a4888a3cb110659ff5a7cfc96be5ddec
MD5 3febf604cc14f18b60edf9870adba726
BLAKE2b-256 064c966c3e27c4196f7a3e1a85efaad634e19b106d4500638ea87f64775005b5

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 56c145971e374642b7bba4714040d8fded0d7d018a698e7be79c789f9de705f7
MD5 1e5529eb35694b0edeb0fef608141561
BLAKE2b-256 0d4486f4efc42f07e78a2cce55be1221cf1dfc9eaf9491bf1af7464dcf4f6ec3

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 0328c66f3bf2b389b8e002d63ea6eba74f86bedb0e630a93a2b9e6dce1787b60
MD5 24adcaabaa2f8b38c31f213f617c3efd
BLAKE2b-256 6d5fb3a503aa84cf089fc83433254e6571a952f1e6a2cd95f5a3afc40addd224

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 adaa408db42e55fb48afff452d7af9f285a641a88e138bb3e03b29102983e8f1
MD5 ee34006ca9f1a4785a893bc663f9d111
BLAKE2b-256 8c6aef5373d7e56bbf6ad414bca8b8a8fad5450ac4f4f1df57da0ba504298357

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 57e836b2683b9ed507660c0ce6af41a59d8de0047d2665d898a3d88c6e487017
MD5 d167c8ce32ee710efa147c3341cd93c4
BLAKE2b-256 54d7e0df0a72774e85f7068888de5a556b6d63a4464886584284d7b2473ab8ed

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 9b185a57d9fa3d242c1e0618becb8aa1c46d2129a9f490a8a9bc1df120ad8aee
MD5 29f266224797e6f329813d2cb79a3dee
BLAKE2b-256 29b420c12e467e0aba12f4ac3218b047d6f317c742b428170272c5bba2281ffb

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 0bf9e3ce1ea6ebd53b47e09c451780638cb52856fe884720cd1ae4b433f8a2cb
MD5 275956f30075fa5d004b3fc4743f387a
BLAKE2b-256 2ca7be75f92ea9feb6f9845ae578fe638775f5cb147b804b208bd12e85dcd486

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d13a9d9ddebdc2f6d93c0c43c39dd071fe9af13fc4f3977f2e380d9c478d74a7
MD5 80f8212ce46fbab6da43d20de1ab4ed5
BLAKE2b-256 730ccd4c08c028529e805899672d687ec5bfc99ff34fb1cf61a7d0a6dc177118

See more details on using hashes here.

Provenance

File details

Details for the file multidict-3.2.0-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-3.2.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 82501e91b8143d48f905b3286ad0ed1bdab7c0f3484295e52dba19ff08d91026
MD5 00f67dfca834fc9b81f360d35fef4223
BLAKE2b-256 185b34065f6f8554d6c76fd51b9e65486f28b6faf40aebcb05bf318b581d7f9c

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