本文由 大侠(AhcaoZhu)原创,转载请声明。
链接: https://blog.csdn.net/Ahcao2008
一图看懂 multidict 模块:类似于字典的键值对集合,键可以多次出现,资料整理+笔记(大全)
- 🧊摘要
- 🧊模块图
- 🧊类关系图
- 🧊模块全展开
- ☘️【multidict】
- 🔵统计
- 🔵常量
- 🌿bool
- 🔵模块
- 🌿2 multidict._abc
- 🌿3 multidict._multidict_base
- 🌿4 multidict._multidict
- 🌿5 multidict._compat
- 🔵类
- 🌿6 multidict._abc.MultiMapping
- method
- 1 getall(self, key, default=None)
- 2 getone(self, key, default=None)
- 🌿7 multidict._abc.MutableMultiMapping
- method
- 1 add(self, key, value)
- 2 extend(self, *args, **kwargs)
- 3 popall(self, key, default=None)
- 4 popone(self, key, default=None)
- 🌿8 multidict._multidict.CIMultiDict
- method
- 1 copy(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 🌿9 multidict._multidict.CIMultiDictProxy
- method
- 1 copy(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 🌿10 multidict._multidict.MultiDict
- method
- 1 add(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 2 clear(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 3 copy(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 4 extend(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 5 get(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 6 getall(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 7 getone(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 8 items(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 9 keys(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 10 pop(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 11 popall(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 12 popitem(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 13 popone(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 14 setdefault(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 15 update(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 16 values(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 🌿11 multidict._multidict.MultiDictProxy
- method
- 1 copy(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 2 get(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 3 getall(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 4 getone(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 5 items(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 6 keys(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 7 values(self, *args, **kwargs) file=...ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
- 🌿12 multidict._multidict.istr
- 🌿13 multidict._multidict.istr
- 🔵内嵌函数或方法
- 🔵私有或局部
- ☘️【multidict._abc】
- ☘️【multidict._multidict_base】
- ☘️【multidict._multidict】
- ☘️【multidict._compat】
- ☘️【abc】
- ☘️【sys】
- ☘️【types】
- ☘️【os】
- ☘️【platform】
🧊摘要
- 全文介绍系统内置 multidict 模块(类似于字典的键值对集合,键可以多次出现)、函数、类及类的方法和属性。
- 它通过代码抓取并经AI智能翻译和人工校对。
- 是一部不可多得的权威字典类工具书。它是系列集的一部分。后续陆续发布、敬请关注。【原创:AhcaoZhu大侠】
🧊模块图
multidict
multidict._abc
multidict._multidict_base
multidict._multidict
multidict._compat
🧊类关系图
◆object
◆collections.abc.Container
◆collections.abc.Iterable
◆collections.abc.Sized
◆collections.abc.Collection
◆collections.abc.Mapping
◆collections.abc.MutableMapping
multidict._abc.MultiMapping
multidict._abc.MutableMultiMapping
multidict._abc.MultiMapping
multidict._multidict.MultiDict
multidict._multidict.CIMultiDict
multidict._multidict.MultiDictProxy
multidict._multidict.CIMultiDictProxy
◆str
multidict._multidict.istr
◆type
◆abc.ABCMeta
multidict._abc._TypingMetad
🧊模块全展开
☘️【multidict】
multidict, fullname=multidict, file=multidict_init_.py
Multidict实现。
HTTP报头和URL查询字符串需要特定的数据结构:multidict。
它的行为很像一个字典,但是对于同一个键它可以有多个值。
🔵统计
序号 | 类别 | 数量 |
---|---|---|
2 | bool | 1 |
4 | str | 6 |
5 | tuple | 1 |
6 | list | 1 |
8 | dict | 1 |
9 | module | 4 |
10 | class | 8 |
12 | builtin_function_or_method | 1 |
13 | residual | 2 |
14 | system | 11 |
15 | private | 4 |
16 | all | 25 |
🔵常量
🌿bool
1 USE_EXTENSIONS True
🔵模块
🌿2 multidict._abc
_abc, fullname=multidict._abc, file=multidict_abc.py
🌿3 multidict._multidict_base
_multidict_base, fullname=multidict._multidict_base, file=multidict_multidict_base.py
🌿4 multidict._multidict
_multidict, fullname=multidict._multidict, file=multidict_multidict.cp37-win_amd64.pyd
🌿5 multidict._compat
_compat, fullname=multidict._compat, file=multidict_compat.py
🔵类
🌿6 multidict._abc.MultiMapping
MultiMapping, multidict._abc.MultiMapping, module=multidict._abc, line:23 at site-packages\multidict_abc.py
method
1 getall(self, key, default=None)
kind=method class=MultiMapping objtype=function line:25 at …\lib\site-packages\multidict_abc.py
2 getone(self, key, default=None)
kind=method class=MultiMapping objtype=function line:29 at …\lib\site-packages\multidict_abc.py
🌿7 multidict._abc.MutableMultiMapping
MutableMultiMapping, multidict._abc.MutableMultiMapping, module=multidict._abc, line:33 at site-packages\multidict_abc.py
method
1 add(self, key, value)
kind=method class=MutableMultiMapping objtype=function line:35 at …\lib\site-packages\multidict_abc.py
2 extend(self, *args, **kwargs)
kind=method class=MutableMultiMapping objtype=function line:39 at …\lib\site-packages\multidict_abc.py
3 popall(self, key, default=None)
kind=method class=MutableMultiMapping objtype=function line:47 at …\lib\site-packages\multidict_abc.py
4 popone(self, key, default=None)
kind=method class=MutableMultiMapping objtype=function line:43 at …\lib\site-packages\multidict_abc.py
🌿8 multidict._multidict.CIMultiDict
CIMultiDict, multidict._multidict.CIMultiDict, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
字典,支持重复的不区分大小写的键。
method
1 copy(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=CIMultiDict objtype=method_descriptor
返回自身的副本。
🌿9 multidict._multidict.CIMultiDictProxy
CIMultiDictProxy, multidict._multidict.CIMultiDictProxy, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
只读代理 CIMultiDict 实例。
method
1 copy(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=CIMultiDictProxy objtype=method_descriptor
返回自身的副本
🌿10 multidict._multidict.MultiDict
MultiDict, multidict._multidict.MultiDict, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
字典,支持重复键。
method
1 add(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
添加键和值,不要覆盖任何先前的值。
2 clear(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
从MultiDict中删除所有项目
3 copy(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回自身的副本。
4 extend(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
用更多的值扩展当前MultiDict。必须使用此方法而不是update。
5 get(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
获取与键匹配的第一个值。该方法是.getone()的别名。
6 getall(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回与键匹配的所有值的列表。
7 getone(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
获取与键匹配的第一个值。
8 items(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回字典项*(键,值)对的新视图。
9 keys(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回字典键的新视图。
10 pop(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
删除最后出现的key并返回相应的值。
如果没有找到key,则返回default,否则引发KeyError。
11 popall(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
删除所有出现的key并返回相应值的列表。
如果没有找到key,则返回default,否则引发KeyError。
12 popitem(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
删除并返回任意(键,值)对。
13 popone(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
删除最后出现的key并返回相应的值。
如果没有找到key,则返回default,否则引发KeyError。
14 setdefault(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回键的值,如果键不存在则将值设置为默认值。
15 update(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
从*other*更新字典,覆盖现有键。
16 values(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDict objtype=method_descriptor
返回字典值的新视图。
🌿11 multidict._multidict.MultiDictProxy
MultiDictProxy, multidict._multidict.MultiDictProxy, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
MultiDict实例的只读代理。
method
1 copy(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
返回自身的副本。
2 get(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
获取与键匹配的第一个值。
该方法是.getone()的别名。
3 getall(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
返回与键匹配的所有值的列表。
4 getone(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
获取与键匹配的第一个值。
5 items(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
返回字典项*(键,值)对的新视图。
6 keys(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
返回字典键的新视图。
7 values(self, *args, **kwargs) file=…ibsite-packagesmultidict_multidict.cp37-win_amd64.pyd
kind=method class=MultiDictProxy objtype=method_descriptor
返回字典值的新视图。
🌿12 multidict._multidict.istr
istr, multidict._multidict.istr, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
istr类实现
🌿13 multidict._multidict.istr
istr, multidict._multidict.istr, module=multidict._multidict, line:-1 at site-packages\multidict_multidict.cp37-win_amd64.pyd
同上。
🔵内嵌函数或方法
14 getversion
🔵私有或局部
15 _abc <module ‘multidict._abc’ from ‘…\lib\site-packages\multidict\_abc.py’>
16 _multidict_base <module ‘multidict._multidict_base’ from ‘…\lib\site-packages\multidict\_multidict_base.py’>
17 _multidict <module ‘multidict._multidict’ from ‘…\lib\site-packages\multidict\_multidict.cp37-win_amd64.pyd’>
18 _compat <module ‘multidict._compat’ from ‘…\lib\site-packages\multidict\_compat.py’>
☘️【multidict._abc】
_abc, fullname=multidict._abc, file=multidict_abc.py
☘️【multidict._multidict_base】
_multidict_base, fullname=multidict._multidict_base, file=multidict_multidict_base.py
☘️【multidict._multidict】
_multidict, fullname=multidict._multidict, file=multidict_multidict.cp37-win_amd64.pyd
☘️【multidict._compat】
_compat, fullname=multidict._compat, file=multidict_compat.py
☘️【abc】
abc, fullname=abc, file=abc.py
☘️【sys】
sys, fullname=sys
☘️【types】
types, fullname=types, file=types.py
☘️【os】
os, fullname=os, file=os.py
☘️【platform】
platform, fullname=platform, file=platform.py