Skip to main content

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

multidict-1.3.0a0-cp35-cp35m-win_amd64.whl (133.4 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-1.3.0a0-cp35-cp35m-win32.whl (123.1 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-1.3.0a0-cp34-cp34m-win_amd64.whl (132.6 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-1.3.0a0-cp34-cp34m-win32.whl (125.0 kB view details)

Uploaded CPython 3.4m Windows x86

File details

Details for the file multidict-1.3.0a0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.3.0a0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 e79c4ece7177e2b796374b669f8a88f7ea22f892d7c58e1aceda5e6e682312b5
MD5 3b82806e65316c2e6651ed954eb3b645
BLAKE2b-256 b25a50bdb71a2579b63b1f7539b562a8a0651d9cde743124fec4dafd1c575d47

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.3.0a0-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.3.0a0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1cc3dc4b2dca592ee21e056960557e99a657513df8e131869c6ebc8858199737
MD5 ab0c8cfc8349cb1033550c7034105106
BLAKE2b-256 96da9bf5fa6657b09dfa93774484c8ab09c6a047d0d0a1da6a5434f2ef60cb45

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.3.0a0-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.3.0a0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 233e00f32d50b5b769c98feaf50b00f82f77572d0dbd79b908e106b0f8b926e3
MD5 2785e9fe4d519b7ba0fd92841ca7f7ce
BLAKE2b-256 9c4424983f3205748a7ea77fe6ae9819eb37aff4b2b9401efe7015c4fb619f43

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.3.0a0-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.3.0a0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 72efe8fdd4f97ddecddd06d5d6331b4f879dd71da9f7638fb69d1b9aedab2d1d
MD5 bc60feb948d0bd154502040562dde90e
BLAKE2b-256 5abe87430c42afd38299fee8fa46a99ea225bd6024699e07e5274e9ab266e2b4

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