Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/site-packages/multidict/__init__.py: 93%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""Multidict implementation.
3HTTP Headers and URL query string require specific data structure:
4multidict. It behaves mostly like a dict but it can have
5several values for the same key.
6"""
8from typing import TYPE_CHECKING
10from ._abc import MultiMapping, MutableMultiMapping
11from ._compat import USE_EXTENSIONS
13__all__ = (
14 "MultiMapping",
15 "MutableMultiMapping",
16 "MultiDictProxy",
17 "CIMultiDictProxy",
18 "MultiDict",
19 "CIMultiDict",
20 "upstr",
21 "istr",
22 "getversion",
23)
25__version__ = "6.4.4"
28if TYPE_CHECKING or not USE_EXTENSIONS:
29 from ._multidict_py import (
30 CIMultiDict,
31 CIMultiDictProxy,
32 MultiDict,
33 MultiDictProxy,
34 getversion,
35 istr,
36 )
37else:
38 from collections.abc import ItemsView, KeysView, ValuesView
40 from ._multidict import (
41 CIMultiDict,
42 CIMultiDictProxy,
43 MultiDict,
44 MultiDictProxy,
45 _ItemsView,
46 _KeysView,
47 _ValuesView,
48 getversion,
49 istr,
50 )
52 MultiMapping.register(MultiDictProxy)
53 MutableMultiMapping.register(MultiDict)
54 KeysView.register(_KeysView)
55 ItemsView.register(_ItemsView)
56 ValuesView.register(_ValuesView)
59upstr = istr