没有合适的资源?快使用搜索试试~ 我知道了~
cattrs:用于 attrs 的复杂自定义类转换器
共73个文件
py:42个
rst:17个
yml:2个
需积分: 12 0 下载量 50 浏览量
2021-08-04
14:25:44
上传
评论
收藏 109KB ZIP 举报
温馨提示
猫 cattrs是一个用于结构化和非结构化数据的开源 Python 库。 cattrs最适用于attrs类、数据类和通常的 Python 集合,但手动注册转换器支持其他类型的类。 Python 拥有一组丰富的功能强大、易于使用的内置数据类型,如字典、列表和元组。 这些数据类型也是大多数数据序列化库的通用语言,适用于 json、msgpack、yaml 或 toml 等格式。 像这样的数据类型,特别是像dict的映射,代表非结构化数据。 您的数据很可能是结构化的:并非所有字段名称组合都是您程序的有效输入值。 在 Python 中,结构化数据最好用类和枚举来表示。 attrs是一个出色的库,用于以声明方式描述数据结构并对其进行验证。 当您cattrs非结构化数据(通过您的网络、文件系统、数据库...)时, cattrs有助于将这些数据转换为结构化数据。 当您必须将结构化数据转换为其他库
资源推荐
资源详情
资源评论
收起资源包目录
cattrs-master.zip (73个子文件)
cattrs-master
MANIFEST.in 263B
README.rst 7KB
CONTRIBUTING.rst 3KB
.github
ISSUE_TEMPLATE.md 317B
workflows
main.yml 2KB
poetry.lock 76KB
src
cattr
_compat.py 9KB
converters.py 26KB
preconf
bson.py 670B
msgpack.py 829B
__init__.py 165B
json.py 1KB
orjson.py 1KB
tomlkit.py 1KB
ujson.py 1KB
pyyaml.py 882B
errors.py 299B
__init__.py 878B
py.typed 0B
disambiguators.py 2KB
dispatch.py 4KB
gen.py 16KB
bench
test_attrs_nested.py 3KB
test_attrs_primitives.py 3KB
test_primitives.py 422B
__init__.py 0B
test_attrs_collections.py 4KB
HISTORY.rst 10KB
tox.ini 829B
LICENSE 1KB
setup.cfg 461B
Makefile 2KB
docs
unstructuring.rst 6KB
preconf.rst 3KB
make.bat 6KB
benchmarking.rst 1KB
structuring.rst 13KB
readme.rst 27B
unions.rst 2KB
contributing.rst 33B
conf.py 9KB
cattr.experimental.rst 362B
usage.rst 3KB
installation.rst 1KB
customizing.rst 5KB
history.rst 28B
index.rst 585B
Makefile 7KB
converters.rst 2KB
tests
test_function_dispatch.py 832B
test_multistrategy_dispatch.py 1KB
_compat.py 324B
test_structure.py 10KB
test_structure_attrs.py 7KB
test_generics.py 3KB
__init__.py 11KB
test_unions.py 2KB
test_recursive.py 425B
test_gen.py 1KB
test_preconf.py 8KB
conftest.py 285B
test_unstructure_collections.py 7KB
test_disambigutors.py 2KB
test_dict_generation.py 6KB
metadata
test_genconverter.py 13KB
test_roundtrips.py 4KB
__init__.py 18KB
test_converter_inheritance.py 1KB
test_unstructure.py 4KB
test_dataclasses.py 1KB
.readthedocs.yml 76B
.gitignore 865B
pyproject.toml 1KB
共 73 条
- 1
资源评论
你就应该
- 粉丝: 43
- 资源: 4600
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功