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

Uploaded Source

Built Distributions

multidict-2.1.0-cp35-cp35m-win_amd64.whl (135.6 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-2.1.0-cp35-cp35m-win32.whl (125.5 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-2.1.0-cp35-cp35m-manylinux1_x86_64.whl (343.2 kB view details)

Uploaded CPython 3.5m

multidict-2.1.0-cp35-cp35m-manylinux1_i686.whl (317.0 kB view details)

Uploaded CPython 3.5m

multidict-2.1.0-cp34-cp34m-win_amd64.whl (134.8 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-2.1.0-cp34-cp34m-win32.whl (127.2 kB view details)

Uploaded CPython 3.4m Windows x86

multidict-2.1.0-cp34-cp34m-manylinux1_x86_64.whl (348.1 kB view details)

Uploaded CPython 3.4m

multidict-2.1.0-cp34-cp34m-manylinux1_i686.whl (320.6 kB view details)

Uploaded CPython 3.4m

File details

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

File metadata

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

File hashes

Hashes for multidict-2.1.0.tar.gz
Algorithm Hash digest
SHA256 f2f70aec0bcad72a7d95eccc3bbe2bd93c131bd6b2befb34aae15a8d3e33f26e
MD5 e7ef71828b41f54f1bcc8e4700509112
BLAKE2b-256 d64c65c77821b41c42d22ae3d85b738a779750072ff4e1d31929e805868c2c56

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3d6a3ecc1cc1b3acfd5ed588048eed822604b6dbdd75bcf37e3abc643089c1cb
MD5 995b7034ded3e11814d73526d31d35bc
BLAKE2b-256 f45a0896f0495efbb73aa9d7e0f9e95416b9de2969feacc4593da4e173e809b8

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 dfcf7b190b480327d7badcb981c3a13873da23b51c49f02202bea7b1e03d9abe
MD5 6fe2df77166eefdef43d471f52b7d3a7
BLAKE2b-256 21bd7ef6b69fcce6b76aaa506910cfae747a87c73f58f6758b414b103b91c4f2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 398274224fcd9eca11b14f8c1d73b57a770f63666c71e33a3bb0a4a87a7ea5ea
MD5 6f0f5b75a23878111a70f7c22bb94aa3
BLAKE2b-256 51bd8873eaa01765e6db52c1a72b6aac6dbc600b45cf9606ecde3611c5aa55a5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8b75dba04b3b72e8c0f4739975e5118a8264d778c429fc59bb8825b2e40e16d1
MD5 21df0892afa6370298e9174c103e5fd2
BLAKE2b-256 dc7b577ff1f0160a56e12a6011ebcbd72e08f382a4d3ffe23fd7f436d7e8094c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 42f2f58b9632f44ddcdb642d422fd87636182f79de39b19c6d9eb1489ed81b61
MD5 8928820b2cb82e36963b3dba963ebf87
BLAKE2b-256 827854971ef81b21b9e39660d4b56aaa01cb88b28dd9634da967fde52369f470

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 62369756eb4e05f659943553f369dd7e8905c46711134bd0c385f49643e05325
MD5 e01d5184ee8c61999826aa6079d3b234
BLAKE2b-256 cf750baf7fa9d59ec22a5317542e5bc8203a1a02cb63ccd35f5109cd2cb805b4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e1ef540d12f5a510bcca90ef712625e7af2df8289681325f3f81c96eec39c054
MD5 21f8bc085cec98f70e98fe4d55308741
BLAKE2b-256 b892c1bdb002efd24c032337b218eafb9b49697337ac142cbaa8245780ad8179

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 77c6a51e4ce81c7cb5d7c35000ec2cfe9171ee5cf3c3711d0f5195ec2dbe167f
MD5 1d601891ecce371e6e499531ad7d4cb7
BLAKE2b-256 2d6b45b00e10b554b588cb3eb4ee8c0e8fa01892e6baac092f63de809309b97b

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