没有合适的资源?快使用搜索试试~ 我知道了~
svarog:Svarog是一个python库,允许从非结构化数据构建结构类型
共45个文件
py:16个
rst:14个
makefile:2个
需积分: 10 0 下载量 87 浏览量
2021-03-27
03:24:56
上传
评论
收藏 27KB ZIP 举报
温馨提示
斯瓦罗格 Svarog允许从非类型化数据创建对象。 它所需要的只是带注释的__init__方法: >>> from svarog import forge ... class A : ... def __init__ ( self , a : int , b : str ): ... self ._a = a ... self ._b = b ... def __repr__ ( self ): ... return f ' A(a= { self ._a } , b=" { self ._b } ") ' >>> forge(A, { " a " : 1 , " b " : " 3 " }) A(a=1, b="3") 可能有更复杂的类型,例如序列,映射,可选 >>> class A : ... def __init__
资源推荐
资源详情
资源评论
收起资源包目录
svarog-master.zip (45个子文件)
svarog-master
setup.py 1KB
.gitignore 1KB
Makefile 2KB
.travis.yml 893B
MANIFEST.in 262B
.pre-commit-config.yaml 1KB
requirements_dev.txt 209B
LICENSE 1KB
HISTORY.rst 89B
setup.cfg 839B
.github
ISSUE_TEMPLATE.md 317B
dependabot.yml 501B
README.rst 3KB
tests
conftest.py 283B
test_forges.py 2KB
test_checks.py 2KB
test_svarog.py 5KB
test_dispatchers.py 2KB
svarog
compat.py 695B
checks.py 1KB
dispatchers
multi.py 1KB
__init__.py 0B
functional.py 1KB
svarog.py 3KB
__init__.py 287B
types.py 294B
forges.py 3KB
py.typed 0B
AUTHORS.rst 165B
CONTRIBUTING.rst 3KB
docs
Makefile 607B
index.rst 303B
conf.py 5KB
modules.rst 55B
history.rst 28B
authors.rst 28B
installation.rst 1KB
make.bat 768B
svarog.dispatchers.rst 538B
svarog.rst 880B
readme.rst 27B
usage.rst 67B
contributing.rst 33B
.editorconfig 292B
tox.ini 663B
共 45 条
- 1
资源评论
吃肥皂吐泡沫
- 粉丝: 28
- 资源: 4587
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功