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 regular dict but it may 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 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

2.1.1 (2016-09-22)

  • Fix CIMultiDict constructor for case of accepting istr #11

2.1.0 (2016-09-18)

  • Allow to create proxy from proxy

  • Add type hints (PEP-484)

2.0.1 (2016-08-02)

  • Don’t crash on {} - MultiDict().keys() and similar operations #6

2.0.0 (2016-07-28)

  • Switch from uppercase approach for case-insensitive string to str.title() #5

  • Deprecase upstr class in favor of istr alias.

1.2.2 (2016-08-02)

  • Don’t crash on {} - MultiDict().keys() and similar operations #6

1.2.1 (2016-07-21)

  • Don’t expose multidict.__version__

1.2.0 (2016-07-16)

  • Make upstr(upstr(‘abc’)) much faster

1.1.0 (2016-07-06)

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

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

  • Provide manylinux wheels as well as Windows ones

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 Distribution

multidict-2.1.1.tar.gz (92.6 kB view details)

Uploaded Source

Built Distributions

multidict-2.1.1-cp35-cp35m-win_amd64.whl (135.7 kB view details)

Uploaded CPython 3.5m Windows x86-64

multidict-2.1.1-cp35-cp35m-win32.whl (125.6 kB view details)

Uploaded CPython 3.5m Windows x86

multidict-2.1.1-cp35-cp35m-manylinux1_x86_64.whl (343.0 kB view details)

Uploaded CPython 3.5m

multidict-2.1.1-cp35-cp35m-manylinux1_i686.whl (316.9 kB view details)

Uploaded CPython 3.5m

multidict-2.1.1-cp34-cp34m-win_amd64.whl (134.9 kB view details)

Uploaded CPython 3.4m Windows x86-64

multidict-2.1.1-cp34-cp34m-win32.whl (127.3 kB view details)

Uploaded CPython 3.4m Windows x86

multidict-2.1.1-cp34-cp34m-manylinux1_x86_64.whl (348.3 kB view details)

Uploaded CPython 3.4m

multidict-2.1.1-cp34-cp34m-manylinux1_i686.whl (321.1 kB view details)

Uploaded CPython 3.4m

File details

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

File metadata

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

File hashes

Hashes for multidict-2.1.1.tar.gz
Algorithm Hash digest
SHA256 b047b0b9ec2d34b9b6c3a623226300173c4d31528aca1279b9ca27a434692b68
MD5 13dfe766fbde49fa85f84c145d2bfccd
BLAKE2b-256 88e6d84d6cfc8bf27763aa3675384c53fcaadcd556d2f4f1574746d613e3f0e4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 af6efe33f5e01516ee439db5e9efa892563fcc4692a8cbcb21d7c8f29bbc3d9c
MD5 610b3e2a55201c07b6f94af21c06794e
BLAKE2b-256 aefd1e4dcd817cab2bb2f3d3482cbe5d85c4d55728e4644687ca9ea38c439b3e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 4ae95fa3ef2fc61b8a94eb8a2ddc54132b80bdb9fda41b630d65423d3d8f1e6c
MD5 5adc1fddb25ebf8ed993f52936124119
BLAKE2b-256 c8fc084289579b390e244f91295afc9f8e42252c0bad487c43edf38cc1a8fdba

See more details on using hashes here.

Provenance

File details

Details for the file multidict-2.1.1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-2.1.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 3c2dcebb919eb603ede4813572d9ca6e3ca69ddad6a5b39feeb4d42930b50b4a
MD5 4156a167d4bd928eb3b61828220ff700
BLAKE2b-256 8ab4852155915e9d723acc54b5e1c86adda724431e0ad7b5b87aafca430ef45c

See more details on using hashes here.

Provenance

File details

Details for the file multidict-2.1.1-cp35-cp35m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-2.1.1-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 a9f53198e119db57d39f14138fc084fd5df15d036928bfcfb7bcbf321bca1625
MD5 e6d8deba8ea6c54655a7baa5500b2a4d
BLAKE2b-256 5cf11d95637c1ff98164ac07ebd89231fd8f4ad7bad7db4a566637d285f8ef9d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 031d090d223470652f56ffd7001ab8b2ac1fb2a3297ca1ca5232343f0b8ed853
MD5 3d5e5057b598c13e18427aa62c436300
BLAKE2b-256 03367fd54582e684cf510096b17eb2bdea26532770b9eda4dc905e3ef6620fa2

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for multidict-2.1.1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 c1dbfcc17496bc6effdbdabffab5fceb6562ba40f55af7d7cd93654e0731bee2
MD5 cc5767f5910328ef9933b95a0824de5f
BLAKE2b-256 058445fa2b1df6d687ad5306caaadb098e1c347b1f85680b82e21c29fb23f8a1

See more details on using hashes here.

Provenance

File details

Details for the file multidict-2.1.1-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for multidict-2.1.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f08e855aa8ada854456273f334d8aafb9aefba9e655baae1ae0e19202df4b41f
MD5 41fe243c978a187c2bec3c2b6e341b1f
BLAKE2b-256 b70df8746c42d6d7e925b4836a93eba5cf2eaea7ca1d8b6e443f2ba19806e0d9

See more details on using hashes here.

Provenance

File details

Details for the file multidict-2.1.1-cp34-cp34m-manylinux1_i686.whl.

File metadata

File hashes

Hashes for multidict-2.1.1-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 35532625e44a0da7d60bbc3d5acd60fc9c5efe2f1bdfc27bd56961514f91b14f
MD5 0200f2fc7f43c7ec996dd9d08df9d590
BLAKE2b-256 d4f218d2e9235a115d52c1317049b2963bfc9c133d1f0601ce953b3b07b59e7e

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