Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

multidict implementation

Project description

Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.


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 interface.

Regular mutable (MultiDict and CIMultiDict) classes implement 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
>>> dct['A']

Keys should be str instances.

The library has optional Cython optimization for sake of speed.


Apache 2

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

1.0.2 (2016-03-24)

  • Fix setup build

1.0.0 (2016-02-19)

  • Initial implementation

Project details

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
multidict-1.2.1-cp34-cp34m-manylinux1_i686.whl (315.4 kB) Copy SHA256 hash SHA256 Wheel cp34
multidict-1.2.1-cp34-cp34m-manylinux1_x86_64.whl (341.7 kB) Copy SHA256 hash SHA256 Wheel cp34
multidict-1.2.1-cp34-cp34m-win32.whl (124.9 kB) Copy SHA256 hash SHA256 Wheel cp34
multidict-1.2.1-cp34-cp34m-win_amd64.whl (132.6 kB) Copy SHA256 hash SHA256 Wheel cp34
multidict-1.2.1-cp35-cp35m-manylinux1_i686.whl (311.7 kB) Copy SHA256 hash SHA256 Wheel cp35
multidict-1.2.1-cp35-cp35m-manylinux1_x86_64.whl (337.9 kB) Copy SHA256 hash SHA256 Wheel cp35
multidict-1.2.1-cp35-cp35m-win32.whl (123.1 kB) Copy SHA256 hash SHA256 Wheel cp35
multidict-1.2.1-cp35-cp35m-win_amd64.whl (133.3 kB) Copy SHA256 hash SHA256 Wheel cp35
multidict-1.2.1.tar.gz (90.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page