从JSON模式生成Python类的源代码。

jschema-to-python的Python项目详细描述


jschema到python

从JSON模式生成Python类。在

使用

python -m jschema_to_python [-h] -s SCHEMA_PATH -o OUTPUT_DIRECTORY [-m MODULE_NAME] -r ROOT_CLASS_NAME [-g HINTS_FILE_PATH] [-f] [-v]

Generate source code for a set of Python classes from a JSON schema.

optional arguments:
  -h, --help            show this help message and exit
  -s SCHEMA_PATH, --schema-path SCHEMA_PATH
                        path to the JSON schema file
  -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
                        directory in which the generated classes will be
                        created
  -m MODULE_NAME, --module-name MODULE_NAME
                        name of the module containing the object model classes
  -r ROOT_CLASS_NAME, --root-class-name ROOT_CLASS_NAME
                        the name of the class at the root of the object model
                        represented by the schema
  -g HINTS_FILE_PATH, --hints-file-path HINTS_FILE_PATH
                        path to a file containing hints that control code
                        generation
  -f, --force           overwrite the output directory if it exists
  -v, --verbose         increase output verbosity (may be specified up to two
                        times)

贡献

这个项目欢迎大家的贡献和建议。大多数投稿需要你同意 贡献者许可协议(CLA)声明您有权并实际上授予我们 使用你的贡献的权利。有关详细信息,请访问https://cla.opensource.microsoft.com。在

当您提交请求时,CLA bot将自动确定您是否需要提供 一个CLA并适当地装饰PR(例如状态检查、评论)。只需按照说明操作即可 由bot提供。您只需使用我们的CLA在所有回购中执行一次。在

本项目采用了Microsoft Open Source Code of Conduct。 有关详细信息,请参阅Code of Conduct FAQ或 如有任何其他问题或意见,请联系opencode@microsoft.com。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用ContentExchange设置请求属性   java Spark/Hdfs/Hdfsclient兼容性   java springcloudstreamkafka配置:instanceCount和instanceIndex   Java中web服务序列化日期   java用动态数据替换占位符   java git gc似乎覆盖了一个packfile,留下了一个打开的文件描述符,其中包含对“oldxxx.pack”的引用   为什么Apache项目对Java版本敏感?   java Anylogic帮助如何在导入的3dobject通过输送机上的多个“站”时更改其颜色?   JavaEclipseNeonM2E可以导入一个大型项目,但似乎不能自动解决依赖关系   java@FindBy搜索具有满足条件的子元素的元素   java如何将ActionEvent e与键绑定一起使用?   java转换以集中方式从外部库抛出的异常   java中用户文件/数据文件与系统/程序文件的区别   java使用变量字符串或字符作为对象名   字体使用Java图形操纵字符串中每个字符的形状   JavaFX图表移动数据   java RandomAccessFile:将所有项设置为相同的字节数?   java Google Play inapp Billing onPurchasesUpdated()错误响应代码1   java在不知道属性名和属性数的情况下处理json对象   java是否可以一次从HazelcastInstance(映射和列表)中删除所有数据?