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 Allow to install the library on systems without compilation toolset Sep 7, 2018
.github
benchmarks Pair list c extension (#234) May 21, 2018
docs Add track GC to View methods (#314) Dec 16, 2018
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 Add tests for pickle protocol v4 Oct 31, 2018
tools Replace py.test with pytest in manylinux1 build script Nov 19, 2018
.appveyor.yml
.gitignore Ignore emacs TAGS file Nov 28, 2018
.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 Set up CI with Azure Pipelines Feb 24, 2019
pyproject.toml 👷⬆️ Add add build dependencies via PEP 518 Jul 27, 2018
pytest.ini Switch to tox-based workflow Jul 19, 2018
setup.cfg Fix type hints (#220) Apr 15, 2018
setup.py Multidict views C ext (#275) Sep 23, 2018
shippable.yml Allow to install the library on systems without compilation toolset Sep 7, 2018
tox.ini Scheduled weekly dependency update for week 52 (#318) Jan 4, 2019

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.