Skip to main content

multidict implementation

Project description

Multidicts are useful for working with HTTP headers, URL query args etc.

The code was extracted from aiohttp library.

Introduction

HTTP Headers and URL query string require specific data structure: multidict. It behaves mostly like a dict but it can have several values for the same key.

multidict has four multidict classes: MultiDict, MultiDictProxy, CIMultiDict and CIMultiDictProxy.

Immutable proxies (MultiDictProxy and CIMultiDictProxy) provide a dynamic view on 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 assumes the keys are case insensitive, e.g.:

>>> dct = CIMultiDict(a='val')
>>> 'A' in dct
True
>>> dct['A']
'val'

Keys should be str instances.

The library has optional Cython optimization for sake of speed.

License

Apache 2

1.1.0 (2016-06-04)

  • Don’t double-iterate during MultiDict initialization #3

  • Fix CIMultiDict.pop: it is case insensitive now #1

1.0.3 (2016-03-24)

  • Add missing MANIFEST.in

1.0.2 (2016-03-24)

  • Fix setup build

1.0.0 (2016-02-19)

  • Initial implementation

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

multidict-1.1.0b3-cp35-cp35m-win_amd64.whl (132.1 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-1.1.0b3-cp35-cp35m-win32.whl (122.0 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-1.1.0b3-cp34-cp34m-win_amd64.whl (131.6 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-1.1.0b3-cp34-cp34m-win32.whl (124.0 kB view details)

Uploaded CPython 3.4m Windows x86

File details

Details for the file multidict-1.1.0b3-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.1.0b3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c1188735ef3474aa3820d97f57dbd15c6123b63b7412f068a589e8c958a12d21
MD5 1672decccc3b6e2a86486a17bbf23b0d
BLAKE2b-256 765f4715710c4bf5b25aaa5ac421f11dc1e1a195da2827b20bd495d93b19be19

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.1.0b3-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.1.0b3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 4304a12a981f8e47dd0188d32349d131586ff15a03b54cf9f826e043046a4957
MD5 1aec468dad11de75192162a283fc0e02
BLAKE2b-256 491af2e2acb5690b9f9f07575f094152960629861f5b1a037ae216b5a3436722

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.1.0b3-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.1.0b3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 46baad97e9a59a149ee06c0ecee1db70a044a2414489ac5f522de33b188fc1ec
MD5 38c02b17a04ea5b7ab8f9ab577bd4f03
BLAKE2b-256 db29ff0948a2f8bbe5c886e34267342928421b63d85ac8855878effd37546d83

See more details on using hashes here.

Provenance

File details

Details for the file multidict-1.1.0b3-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.1.0b3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 5b93175c379c84c15e1420235811a097959cc8b1818c3d6c7b0765333262fd65
MD5 72071c1275fec9594736e3b73dd1934d
BLAKE2b-256 ce74a7d930082dad656894fc5fd56b1e1294e64ad94feedb5e38cad2f5579c9a

See more details on using hashes here.

Provenance

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