Skip to main content

multidict implementation

Project description

https://readthedocs.org/projects/multidict/badge/?version=latest https://img.shields.io/appveyor/ci/asvetlov/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.

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
multidict-4.4.0a33-cp34-cp34m-win32.whl (152.3 kB) Copy SHA256 hash SHA256 Wheel cp34 Aug 13, 2018
multidict-4.4.0a33-cp34-cp34m-win_amd64.whl (158.4 kB) Copy SHA256 hash SHA256 Wheel cp34 Aug 13, 2018
multidict-4.4.0a33-cp35-cp35m-win32.whl (151.8 kB) Copy SHA256 hash SHA256 Wheel cp35 Aug 13, 2018
multidict-4.4.0a33-cp35-cp35m-win_amd64.whl (161.1 kB) Copy SHA256 hash SHA256 Wheel cp35 Aug 13, 2018
multidict-4.4.0a33-cp36-cp36m-win32.whl (152.9 kB) Copy SHA256 hash SHA256 Wheel cp36 Aug 13, 2018
multidict-4.4.0a33-cp36-cp36m-win_amd64.whl (162.1 kB) Copy SHA256 hash SHA256 Wheel cp36 Aug 13, 2018
multidict-4.4.0a33-cp37-cp37m-win32.whl (152.8 kB) Copy SHA256 hash SHA256 Wheel cp37 Aug 13, 2018
multidict-4.4.0a33-cp37-cp37m-win_amd64.whl (162.1 kB) Copy SHA256 hash SHA256 Wheel cp37 Aug 13, 2018
multidict-4.4.0a33.tar.gz (121.4 kB) Copy SHA256 hash SHA256 Source None Aug 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page