Skip to main content

Generate source code for Python classes from a JSON schema.

Project description

jschema-to-python

Generate Python classes from a JSON schema.

Usage

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)

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jschema_to_python-1.1.4.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

jschema_to_python-1.1.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file jschema_to_python-1.1.4.tar.gz.

File metadata

  • Download URL: jschema_to_python-1.1.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for jschema_to_python-1.1.4.tar.gz
Algorithm Hash digest
SHA256 175526abfa5e38a0f054b113d9f0fa96cedd91e0ae7e3be07fa24f949fde974f
MD5 94a8d06b97ec6f5822c0856e7a1a4549
BLAKE2b-256 06b52daef572300d1e27bcba4c6fd35233b133de535c2abb9097d525e1259587

See more details on using hashes here.

File details

Details for the file jschema_to_python-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: jschema_to_python-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for jschema_to_python-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 733cf1d918222480570479e1cd95c3302f2de9c7040ffb05fef27d70a7f4fd7f
MD5 af52eb452fa72fd77160a61ab68b4a0b
BLAKE2b-256 a7e8e684f94db8f832770d6013b690369e297ab7ba70c47f8775312e347b93d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page