A converter from JSONSchema to Pydantic classes
Project description
JSONSchema Converter
JSONSchema Converter is a tool that performs conversions from a json-schema file to pydantic classes
installation
pip install jsonschema-converter
usage
main.py
from argparse import ArgumentParser
from jsonschema_converter.parse import parse_json
def main(file_name: str):
parse_json(file_name)
def parse_args():
argument_parser = ArgumentParser(
prog="JsonSchema2Pydantic",
description="creates classes from json_schema file"
)
argument_parser.add_argument("file_name")
args = argument_parser.parse_args()
return args.file_name
if __name__ == "__main__":
main(parse_args())
python main.py myjsonschema.json
examples
you can find examples of jsonschema input and pydantic classes output in the examples folder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jsonschema_converter-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c750853c49c32806b0e537ef046bd10c172c8cd2c6b2166a0e8efb2b4e3488b1 |
|
MD5 | 20668b91875d517b4025e0f8e2f4bec1 |
|
BLAKE2b-256 | f1b9e6ee18e2646c3db105ab3a0cced04431f00ae4e072725b078305a76fd2b0 |
Close
Hashes for jsonschema_converter-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbbd50dd57d08d1ca7c2283ea2a5269652382d38234939a9f601b2128cbbdebb |
|
MD5 | d290de565f2bf48311fb7b803b388bc4 |
|
BLAKE2b-256 | 12338c7f8ead5b20707d509f5ec32b92a6a876b4c1038856fece9ef70da7109d |