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.parse 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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab0dfa3c11b8661eb1e33f15fd2569a3e0debbece5b4c1139842a37809399199 |
|
MD5 | 20597b82957a4cb25be9c945fca15729 |
|
BLAKE2b-256 | fa645e87ec9ffb6e6b0055859e1bbad151051695b9ae2e943d16c42a99251ae5 |
Close
Hashes for jsonschema_converter-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1ffc448c59ae0da55c8a5abc344996ac0c786ca8836d76087608be710497c81 |
|
MD5 | b671d9e1484ae71cd5e31a9cba0907bf |
|
BLAKE2b-256 | f0d32e593324cb9231c77c2d9f505ecd25d08b64676ced546599689b540614e9 |