【文件属性】:
文件名称:json-schema-to-class:将JSON模式转换为Python类
文件大小:12KB
文件格式:ZIP
更新时间:2021-05-08 15:30:29
Python
json模式到类
将JSON模式转换为Python类
安装
需要Python 3.6以上版本。
pip install json-schema-to-class
用法
例如,将转换为Python类:
# generate & highlight
json-schema-to-class tests/test_schema.json --indent 2 | pygmentize
# or generate to file
json-schema-to-class tests/test_schema.json -o tests/schema_build.py
# generate code with __repr__ method
json-schema-to-class tests/test_schema.json --indent 2 --repr | pygmentize
按照
【文件预览】:
json-schema-to-class-master
----setup.py(1KB)
----.gitignore(1KB)
----requirements.txt(11B)
----.travis.yml(1KB)
----MANIFEST.in(59B)
----LICENSE(1KB)
----json_schema_to_class.py(13KB)
----README.md(2KB)
----tests()
--------test_schema.json(1KB)
--------test_json_schema_to_class.py(5KB)
--------test_schema_4.json(221B)
--------test_schema_3.json(366B)
--------test_schema_2.json(2KB)
----.flake8(74B)