jsonapy:用于将模型转储为JSON:API格式的Python库

时间:2021-02-10 20:16:31
【文件属性】:
文件名称:jsonapy:用于将模型转储为JSON:API格式的Python库
文件大小:90KB
文件格式:ZIP
更新时间:2021-02-10 20:16:31
python json-api python3 jsonapi json-api-serializer JSON:APy-在Python中加载和转储JSON:API WIP:该库仍处于早期开发阶段。 jsonapy是一个Python库,用于将模型转储到兼容JSON:API的JSON中。 安装 随着pip : pip install jsonapy 基本用法概述 该软件包可让您定义模型并将其转储为具有JSON:API结构的字典。 首先,定义资源: import jsonapy class PersonResource ( jsonapy . BaseResource ): id : int first_name : str last_name : str class Meta : resource_name = "person" 现在,您可以将此资源的实例转储到JSON:API结构化的字典中: guido = PersonResour
【文件预览】:
jsonapy-master
----poetry.lock(34KB)
----jsonapy()
--------base.py(20KB)
--------document.py(1KB)
--------utils.py(417B)
--------__init__.py(4KB)
----scripts()
--------pre-commit(387B)
--------docs()
----LICENSE(1KB)
----README.md(1KB)
----Makefile(261B)
----docs()
--------index.html(19KB)
--------.nojekyll(0B)
--------jsonapy()
--------CNAME(20B)
--------jsonapy.html(47KB)
----tests()
--------test_jsonapy.py(88B)
--------resource()
--------__init__.py(0B)
--------document()
----.gitignore(66B)
----pyproject.toml(478B)

网友评论