Skip to main content

multidict implementation

Project description

GitHub status for master branch Coverage metrics PyPI Documentationb Python versions 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 C Extensions for sake of speed.

License

Apache 2

Library Installation

$ pip install multidict

The library is Python 3 only!

PyPI contains binary wheels for Linux, Windows and MacOS. If you want to install multidict on another operation system (or Alpine Linux inside a Docker) the Tarball will be used to compile the library from sources. It requires C compiler and Python headers installed.

To skip the compilation please use MULTIDICT_NO_EXTENSIONS environment variable, e.g.:

$ MULTIDICT_NO_EXTENSIONS=1 pip install multidict

Please note, Pure Python (uncompiled) version is about 20-50 times slower depending on the usage scenario!!!

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-5.2.0a6.tar.gz (53.5 kB view hashes)

Uploaded Source

Built Distributions

multidict-5.2.0a6-cp310-cp310-win_amd64.whl (49.1 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

multidict-5.2.0a6-cp310-cp310-win32.whl (46.7 kB view hashes)

Uploaded CPython 3.10 Windows x86

multidict-5.2.0a6-cp310-cp310-musllinux_1_1_x86_64.whl (151.8 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

multidict-5.2.0a6-cp310-cp310-musllinux_1_1_s390x.whl (155.3 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ s390x

multidict-5.2.0a6-cp310-cp310-musllinux_1_1_ppc64le.whl (160.0 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ ppc64le

multidict-5.2.0a6-cp310-cp310-musllinux_1_1_i686.whl (148.3 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

multidict-5.2.0a6-cp310-cp310-musllinux_1_1_aarch64.whl (155.3 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ ARM64

multidict-5.2.0a6-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (134.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

multidict-5.2.0a6-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (137.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

multidict-5.2.0a6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (133.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

multidict-5.2.0a6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (178.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

multidict-5.2.0a6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (175.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

multidict-5.2.0a6-cp310-cp310-macosx_11_0_arm64.whl (49.5 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

multidict-5.2.0a6-cp310-cp310-macosx_10_9_x86_64.whl (49.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

multidict-5.2.0a6-cp310-cp310-macosx_10_9_universal2.whl (67.8 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

multidict-5.2.0a6-cp39-cp39-win_amd64.whl (49.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

multidict-5.2.0a6-cp39-cp39-win32.whl (46.7 kB view hashes)

Uploaded CPython 3.9 Windows x86

multidict-5.2.0a6-cp39-cp39-musllinux_1_1_x86_64.whl (151.4 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

multidict-5.2.0a6-cp39-cp39-musllinux_1_1_s390x.whl (155.0 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ s390x

multidict-5.2.0a6-cp39-cp39-musllinux_1_1_ppc64le.whl (159.6 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ ppc64le

multidict-5.2.0a6-cp39-cp39-musllinux_1_1_i686.whl (148.0 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

multidict-5.2.0a6-cp39-cp39-musllinux_1_1_aarch64.whl (154.9 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ ARM64

multidict-5.2.0a6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (134.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

multidict-5.2.0a6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (137.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

multidict-5.2.0a6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (132.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

multidict-5.2.0a6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (178.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

multidict-5.2.0a6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (175.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

multidict-5.2.0a6-cp39-cp39-macosx_11_0_arm64.whl (49.4 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

multidict-5.2.0a6-cp39-cp39-macosx_10_9_x86_64.whl (49.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

multidict-5.2.0a6-cp39-cp39-macosx_10_9_universal2.whl (67.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

multidict-5.2.0a6-cp38-cp38-win_amd64.whl (49.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

multidict-5.2.0a6-cp38-cp38-win32.whl (46.7 kB view hashes)

Uploaded CPython 3.8 Windows x86

multidict-5.2.0a6-cp38-cp38-musllinux_1_1_x86_64.whl (159.8 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

multidict-5.2.0a6-cp38-cp38-musllinux_1_1_s390x.whl (163.4 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ s390x

multidict-5.2.0a6-cp38-cp38-musllinux_1_1_ppc64le.whl (168.7 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ ppc64le

multidict-5.2.0a6-cp38-cp38-musllinux_1_1_i686.whl (156.0 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

multidict-5.2.0a6-cp38-cp38-musllinux_1_1_aarch64.whl (163.3 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ ARM64

multidict-5.2.0a6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl (142.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ s390x

multidict-5.2.0a6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (147.4 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ppc64le

multidict-5.2.0a6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (142.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

multidict-5.2.0a6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (191.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

multidict-5.2.0a6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (187.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

multidict-5.2.0a6-cp38-cp38-macosx_11_0_arm64.whl (49.5 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

multidict-5.2.0a6-cp38-cp38-macosx_10_9_x86_64.whl (49.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

multidict-5.2.0a6-cp38-cp38-macosx_10_9_universal2.whl (68.0 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64)

multidict-5.2.0a6-cp37-cp37m-win_amd64.whl (48.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

multidict-5.2.0a6-cp37-cp37m-win32.whl (46.7 kB view hashes)

Uploaded CPython 3.7m Windows x86

multidict-5.2.0a6-cp37-cp37m-musllinux_1_1_x86_64.whl (142.8 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

multidict-5.2.0a6-cp37-cp37m-musllinux_1_1_s390x.whl (142.3 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ s390x

multidict-5.2.0a6-cp37-cp37m-musllinux_1_1_ppc64le.whl (150.5 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ ppc64le

multidict-5.2.0a6-cp37-cp37m-musllinux_1_1_i686.whl (138.3 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

multidict-5.2.0a6-cp37-cp37m-musllinux_1_1_aarch64.whl (146.6 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ ARM64

multidict-5.2.0a6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl (117.7 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ s390x

multidict-5.2.0a6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (120.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ppc64le

multidict-5.2.0a6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (117.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

multidict-5.2.0a6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (163.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

multidict-5.2.0a6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (160.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

multidict-5.2.0a6-cp37-cp37m-macosx_10_9_x86_64.whl (49.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

multidict-5.2.0a6-cp36-cp36m-win_amd64.whl (48.9 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

multidict-5.2.0a6-cp36-cp36m-win32.whl (46.7 kB view hashes)

Uploaded CPython 3.6m Windows x86

multidict-5.2.0a6-cp36-cp36m-musllinux_1_1_x86_64.whl (141.7 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

multidict-5.2.0a6-cp36-cp36m-musllinux_1_1_s390x.whl (141.4 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ s390x

multidict-5.2.0a6-cp36-cp36m-musllinux_1_1_ppc64le.whl (149.5 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ ppc64le

multidict-5.2.0a6-cp36-cp36m-musllinux_1_1_i686.whl (137.3 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

multidict-5.2.0a6-cp36-cp36m-musllinux_1_1_aarch64.whl (145.4 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ ARM64

multidict-5.2.0a6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl (116.6 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ s390x

multidict-5.2.0a6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (119.8 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ ppc64le

multidict-5.2.0a6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (116.0 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ ARM64

multidict-5.2.0a6-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (163.0 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

multidict-5.2.0a6-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (159.1 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

multidict-5.2.0a6-cp36-cp36m-macosx_10_9_x86_64.whl (49.2 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

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