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

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 Distribution

multidict-1.0.1.tar.gz (90.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

multidict-1.0.1-cp35-cp35m-win_amd64.whl (126.9 kB view details)

Uploaded CPython 3.5mWindows x86-64

multidict-1.0.1-cp35-cp35m-win32.whl (119.6 kB view details)

Uploaded CPython 3.5mWindows x86

multidict-1.0.1-cp34-cp34m-win_amd64.whl (126.5 kB view details)

Uploaded CPython 3.4mWindows x86-64

multidict-1.0.1-cp34-cp34m-win32.whl (120.7 kB view details)

Uploaded CPython 3.4mWindows x86

File details

Details for the file multidict-1.0.1.tar.gz.

File metadata

  • Download URL: multidict-1.0.1.tar.gz
  • Upload date:
  • Size: 90.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for multidict-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c4f386b7b00c404376486eea7f28550d9d381920061f66fd47155473af9d460f
MD5 7ac5c34b26ffe6cd477cebe53d3705c4
BLAKE2b-256 79e5f69cc2fad40157f02d27d809dc7aab0bde53c6cd9ecd92bbe913fc5f67b4

See more details on using hashes here.

File details

Details for the file multidict-1.0.1-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.0.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 a9ec64c16c880e1ed560518fd70cd1801221f63c9ebd188ef6c21c7712ac7b9f
MD5 c83e576bf2b1b50ab8737ca056da9a91
BLAKE2b-256 5645d62027a3589f6aa106d5cf3ca2936eb30cc146c8172e253744aa50ee3e8f

See more details on using hashes here.

File details

Details for the file multidict-1.0.1-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.0.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 7ec1d04ac96e42f1d3e0bf5c521efa1ff4a2a373b7c48769b682c92e30dd9ea6
MD5 49941532e518bff68890b6aac72756fd
BLAKE2b-256 160cb0283f4836debbc21103a558edff7434bfcaff5ffa85c70259217082b0e4

See more details on using hashes here.

File details

Details for the file multidict-1.0.1-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for multidict-1.0.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 8b40ce5635c617525e81a0f3a94a743b249ba62fe1777ff3cefe06917b908462
MD5 4364090585aeccfbe99a95736eee914b
BLAKE2b-256 57f5a47abdc396c6054a5d0e9d90570d2c57935da844df85a561c638c044d047

See more details on using hashes here.

File details

Details for the file multidict-1.0.1-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for multidict-1.0.1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 da4bff7c068de18477c761b8d99b036ce261ba3dcd1b7e4fc59b66015a444168
MD5 025220ec2cf6f20a5111ee268bcd05cd
BLAKE2b-256 1c259914c6c52bcb5ab2b260f9dd1b9f3814c1cf3b2401da875737de07a12e77

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page