Skip to main content

multidict implementation

Project description

https://img.shields.io/pypi/v/multidict.svg https://readthedocs.org/projects/multidict/badge/?version=latest https://img.shields.io/travis-ci/com/aio-libs/multidict/master.svg https://img.shields.io/appveyor/ci/asvetlov/multidict/master.svg?label=Windows%20build%20%40%20Appveyor https://img.shields.io/pypi/pyversions/multidict.svg Coverage metrics Chat on Gitter

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

Changelog

See RTD page.

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-4.4.0a14.tar.gz (118.0 kB view hashes)

Uploaded Source

Built Distributions

multidict-4.4.0a14-cp37-cp37m-win_amd64.whl (162.1 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

multidict-4.4.0a14-cp37-cp37m-win32.whl (152.8 kB view hashes)

Uploaded CPython 3.7m Windows x86

multidict-4.4.0a14-cp37-cp37m-manylinux1_x86_64.whl (389.3 kB view hashes)

Uploaded CPython 3.7m

multidict-4.4.0a14-cp37-cp37m-manylinux1_i686.whl (365.5 kB view hashes)

Uploaded CPython 3.7m

multidict-4.4.0a14-cp36-cp36m-win_amd64.whl (162.1 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

multidict-4.4.0a14-cp36-cp36m-win32.whl (152.9 kB view hashes)

Uploaded CPython 3.6m Windows x86

multidict-4.4.0a14-cp36-cp36m-manylinux1_x86_64.whl (388.9 kB view hashes)

Uploaded CPython 3.6m

multidict-4.4.0a14-cp36-cp36m-manylinux1_i686.whl (364.6 kB view hashes)

Uploaded CPython 3.6m

multidict-4.4.0a14-cp35-cp35m-win_amd64.whl (161.1 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

multidict-4.4.0a14-cp35-cp35m-win32.whl (151.8 kB view hashes)

Uploaded CPython 3.5m Windows x86

multidict-4.4.0a14-cp35-cp35m-manylinux1_x86_64.whl (381.1 kB view hashes)

Uploaded CPython 3.5m

multidict-4.4.0a14-cp35-cp35m-manylinux1_i686.whl (357.2 kB view hashes)

Uploaded CPython 3.5m

multidict-4.4.0a14-cp34-cp34m-win_amd64.whl (158.4 kB view hashes)

Uploaded CPython 3.4m Windows x86-64

multidict-4.4.0a14-cp34-cp34m-win32.whl (152.3 kB view hashes)

Uploaded CPython 3.4m Windows x86

multidict-4.4.0a14-cp34-cp34m-manylinux1_x86_64.whl (385.6 kB view hashes)

Uploaded CPython 3.4m

multidict-4.4.0a14-cp34-cp34m-manylinux1_i686.whl (361.4 kB view hashes)

Uploaded CPython 3.4m

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