Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

multidict implementation

Project Description

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.3.0 (2017-10-15)

  • Introduce abstract base classes (#102)
  • Publish OSX binary wheels (#153)

3.2.0 (2017-09-17)

  • Fix pickling (#134)
  • Fix equality check when other contains more keys (#124)
  • Fix CIMultiDict copy (#107)

3.1.3 (2017-07-14)

  • Fix build

3.1.2 (2017-07-14)

  • Fix type annotations

3.1.1 (2017-07-09)

  • Remove memory leak in istr implementation (#105)

3.1.0 (2017-06-25)

  • Raise RuntimeError on dict iterations if the dict was changed (#99)
  • 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
Release History

Release History

This version
History Node

3.3.0

History Node

3.2.1a0

History Node

3.2.0

History Node

3.2.0a3

History Node

3.1.4a3

History Node

3.1.4a2

History Node

3.1.4a1

History Node

3.1.4a0

History Node

3.1.3

History Node

3.1.3a0

History Node

3.1.2

History Node

3.1.1

History Node

3.1.0

History Node

3.0.0

History Node

2.1.6

History Node

2.1.5

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

History Node

2.0.1

History Node

2.0.0

History Node

1.3.0a1

History Node

1.3.0a0

History Node

1.2.2

History Node

1.2.1

History Node

1.2.0

History Node

1.1.0

History Node

1.1.0b8

History Node

1.1.0b7

History Node

1.1.0b6

History Node

1.1.0b5

History Node

1.1.0b4

History Node

1.1.0b3

History Node

1.1.0b2

History Node

1.1.0b1

History Node

1.1.0a6

History Node

1.1.0a5

History Node

1.1.0a3

History Node

1.1.0a2

History Node

1.1.0a1

History Node

1.1.0a0

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0a0

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
multidict-3.3.0-cp34-cp34m-macosx_10_10_x86_64.whl (199.2 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-macosx_10_11_x86_64.whl (198.3 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-macosx_10_12_x86_64.whl (197.5 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-manylinux1_i686.whl (416.7 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-manylinux1_x86_64.whl (445.5 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-win32.whl (171.0 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp34-cp34m-win_amd64.whl (180.3 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-macosx_10_10_x86_64.whl (198.9 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-macosx_10_11_x86_64.whl (198.4 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-macosx_10_12_x86_64.whl (193.1 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-manylinux1_i686.whl (410.8 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-manylinux1_x86_64.whl (440.2 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-win32.whl (170.6 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp35-cp35m-win_amd64.whl (183.8 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-macosx_10_10_x86_64.whl (200.6 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-macosx_10_11_x86_64.whl (200.0 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-macosx_10_12_x86_64.whl (193.0 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-manylinux1_i686.whl (418.6 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-manylinux1_x86_64.whl (449.7 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-win32.whl (171.6 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0-cp36-cp36m-win_amd64.whl (185.2 kB) Copy SHA256 Checksum SHA256 cp36 Wheel Oct 15, 2017
multidict-3.3.0.tar.gz (34.9 kB) Copy SHA256 Checksum SHA256 Source Oct 15, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting