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
requirements
pydantic>=2.5.3 loguru>=0.7.1
usage
script main.py
from jsonschema_converter.main_parser import parse_json_schema
from jsonschema_converter.utils import parse_args
if __name__ == "__main__":
file_name, module_name = parse_args()
parse_json_schema(file_name, module_name)
CLI
python main.py --file_name myjsonschema.json --module_name schemas
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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 594f6681107a2d67b360e155295cde61e37367c1145080da256f46daa5f04678 |
|
MD5 | 597f2b43696aa25de215180a4ebe7062 |
|
BLAKE2b-256 | 7cb68438cc16f4150fbccedbf1039c0d877dd8166d78ef50bfedcbfc287d63e2 |
Close
Hashes for jsonschema_converter-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8afa6aff411e91286c8a660237d0fd2d89a9bb294c19951b058fa8ea2ef255eb |
|
MD5 | d8b3a0761cdd00f7088ca3babc989bf7 |
|
BLAKE2b-256 | 68034768ef600fe245a54a54f5fa44bfe46e374dab2f768f96b54949d532f1f1 |