experimental/sources/: multidict-6.0.5 metadata and description

Homepage Simple index

multidict implementation

author Andrew Svetlov
author_email andrew.svetlov@gmail.com
classifiers
  • Development Status :: 5 - Production/Stable
  • Intended Audience :: Developers
  • License :: OSI Approved :: Apache Software License
  • Programming Language :: Python
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.7
  • Programming Language :: Python :: 3.8
  • Programming Language :: Python :: 3.9
  • Programming Language :: Python :: 3.10
  • Programming Language :: Python :: 3.11
  • Programming Language :: Python :: 3.12
description_content_type text/x-rst
license Apache 2
project_urls
  • Chat: Gitter, https://gitter.im/aio-libs/Lobby
  • CI: GitHub, https://github.com/aio-libs/multidict/actions
  • Coverage: codecov, https://codecov.io/github/aio-libs/multidict
  • Docs: RTD, https://multidict.aio-libs.org
  • GitHub: issues, https://github.com/aio-libs/multidict/issues
  • GitHub: repo, https://github.com/aio-libs/multidict
requires_python >=3.7
File Tox results History
multidict-6.0.5.tar.gz
Size
58 KB
Type
Source
GitHub status for master branch Coverage metrics PyPI Documentation Python versions Chat on Gitter

Multidict is dict-like collection of key-value pairs where key might occur 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 them to change their own content.

Case insensitive (CIMultiDict and CIMultiDictProxy) 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 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 operating system (or Alpine Linux inside a Docker) the tarball will be used to compile the library from source. It requires a C compiler and Python headers to be installed.

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

$ MULTIDICT_NO_EXTENSIONS=1 pip install multidict

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

Changelog

See RTD page.