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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 681747e30f45d3ec4156c560a432758b1eb037b7420039f469ae343ab1ba4cf3 |
|
MD5 | 07a0141bd2ebe78773ee2f3e298591bf |
|
BLAKE2b-256 | 2cdbc1346b7284b8b318d6347d5d5a7357d0542a4d3fd3927c13e3875d5e7ddf |
Close
Hashes for jsonschema_converter-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4803906bd025bc162f2b44b219e64ba07a916dddc35074afa0e964d8a9691459 |
|
MD5 | 7b03002e6bfb04c2560329ad5dfba744 |
|
BLAKE2b-256 | 62afd3aeb48b11da87a92cfa4f48a4ba6efd63770075e9a6b095d31b13f0b9ba |