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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152f0672dbb6191a65d6c3de804b2b21ab662ff6077036d37c439fa892f363cf |
|
MD5 | 8507abc95312f608932944e1ac99bff9 |
|
BLAKE2b-256 | dda1ee71c6257fa44de25ee3a5752db87d716d7fd3de80d5dfe8b291f8902e3c |
Close
Hashes for jsonschema_converter-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63541781341b2c2d2bec2af134e62967a602d1212313b0094777169c7c8fa082 |
|
MD5 | 9563e456370a0cb5e341fc7461b01f68 |
|
BLAKE2b-256 | 82367178962c1662427fa60e296bf6790f6da02f8d6dfb3a180b3aefd9dc2104 |