Skip to content
multidict implementation
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
benchmarks
docs
multidict Fix gc track for iterator and pair_list. (#321) Jan 5, 2019
requirements Scheduled weekly dependency update for week 01 (#322) Jan 8, 2019
tests
tools Replace py.test with pytest in manylinux1 build script Nov 19, 2018
.appveyor.yml
.gitignore
.pyup.yml
.readthedocs.yml
.travis.yml Drop trailing equal signs from job names Oct 14, 2018
LICENSE Update a year May 13, 2017
MANIFEST.in Exclude *.so and *.pyd from source tarball Sep 17, 2018
Makefile
README.rst Fix appveyor badges in readme Sep 17, 2018
azure-pipelines.yml
pyproject.toml
pytest.ini
setup.cfg Fix type hints (#220) Apr 15, 2018
setup.py
shippable.yml Allow to install the library on systems without compilation toolset Sep 7, 2018
tox.ini

README.rst

multidict

https://readthedocs.org/projects/multidict/badge/?version=latest https://img.shields.io/appveyor/ci/aio-libs/multidict/master.svg?label=Windows%20build%20%40%20Appveyor 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.

You can’t perform that action at this time.