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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 674474edcceb203484036fb77da3843b5e1fdadd9faed8514049e5deb261216c |
|
MD5 | dbf0d96977619a38a74ad1fa5b52884f |
|
BLAKE2b-256 | 390721b557049c0863f0364fef7d5ad6d1ac904f2c5ceaa185d09f956337539c |
Close
Hashes for jsonschema_converter-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c100b6efa007dc680499f452062bcfaa3dad6d3d1efa6368b259e636e155a214 |
|
MD5 | 06941150b78ba078a810dacc06218022 |
|
BLAKE2b-256 | b45f21c028a9d375c1184f53171d6c60fe6fae7646caec3ce8ceb25a983a73f0 |