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 regular dict but it may 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 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

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

Uploaded Source

Built Distributions

multidict-2.1.2-cp35-cp35m-win_amd64.whl (134.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-2.1.2-cp35-cp35m-win32.whl (124.2 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-2.1.2-cp35-cp35m-manylinux1_x86_64.whl (340.8 kB view details)

Uploaded CPython 3.5m

multidict-2.1.2-cp35-cp35m-manylinux1_i686.whl (312.9 kB view details)

Uploaded CPython 3.5m

multidict-2.1.2-cp34-cp34m-win_amd64.whl (133.9 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-2.1.2-cp34-cp34m-win32.whl (126.2 kB view details)

Uploaded CPython 3.4m Windows x86

multidict-2.1.2-cp34-cp34m-manylinux1_x86_64.whl (344.6 kB view details)

Uploaded CPython 3.4m

multidict-2.1.2-cp34-cp34m-manylinux1_i686.whl (316.5 kB view details)

Uploaded CPython 3.4m

File details

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

File metadata

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

File hashes

Hashes for multidict-2.1.2.tar.gz
Algorithm Hash digest
SHA256 d90367472d55de953d4b8d99029067026418d213a88f43e8b0554d7408188576
MD5 e2b8c866d06d55553e82d31aded3cdb5
BLAKE2b-256 8b99a32210e82198db00d071aa207432b898ddd8061000d00d3841a63a734d31

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3e6ad3b4448d79a90a9d951a03ef6f0bdf298a63d9a6b82c76f8dfc51e1d9ac3
MD5 5c60433a82427bf640b475585371e07e
BLAKE2b-256 5a6d73b550f108fdb4d6368e3e1c497fdf08519972443d2c700dbd6c6bf67474

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 f59f1040999ac5fa48488d2d69cd7b19ee5a07fa6ff5812cb7cdf8958b45a7e4
MD5 a230f0b37f0efd2c29b72e45f31c640e
BLAKE2b-256 147aa17f39a28572fc87006f260e51b49e7f32a0d84bea4b11dddfce052e1e68

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4928bc93c6992d9443848db5cef5ab434d0694853f4dc0b044d1a0a62035bc4c
MD5 9d8640bf5a7f8a6389c25d96b02ef66f
BLAKE2b-256 478e6535143b187353f2c0fca4fc279c8eaa7094726155be967f4a7cf1ecbaa2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 0cefc346d05001c40242f2b067d563545cae5507701c56739ee2f1e854086fe7
MD5 b3b8b641c6a689f23619643027b63289
BLAKE2b-256 962d855c0ef2d00d337f3dae89c3fd30331193ae886d33696ce92c7058cad956

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 959a493834ddc0c4db64eeec0eb2b91ebe10d3a32f998ab1b61ecf0ddc51c2ba
MD5 8095e5fe23a5098e4d61e215f54cac57
BLAKE2b-256 bd74be6dd1db6db594beb2123b65d50b8cc056f18ee8a3659f0a8fcc29b24623

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 9d01212dd641ac5df1d181006de32381e80489a6cdb299d42aed3e04667d4f49
MD5 fa430f9f173b123d4fa0c9fe5221927d
BLAKE2b-256 1e5e3ca780c2b403fa587e1a80b2235eaf4642638838702d0d8705de2acaf93f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0c6a3f6fe37871e69020067d5ebcc9b8407d283dc2ced1e1974c3c487a4f6322
MD5 1ef19c3dea2a1b3e1a74171bc23e32b0
BLAKE2b-256 3d66fa8732c83319bc8217c7ec6fcfe34a3064a212547229457ac934fcff118f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.2-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 4f3c4598d0a2cedcc5aebeb72045f5348bf3ff1cda3dcd081f541caf1221cacd
MD5 4c0c72b3d15d45a70cdd182895c5a252
BLAKE2b-256 d431722c50f9c348221983d2b919ac3d3f2c82967033a80d1c1ac7a75f74bf58

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