Skip to main content

extracts python models from json files

Project description

json to models

extracts python models from json files

usage

pip install json-to-models
from json_to_models import JsonToModels
import glob, json

jtm = JsonToModels(root_name='Root')

for path in glob.glob(f'./json_data/*.json'):
    print(path)
    with open(path) as f:
        data = json.load(f)
    jtm.extract_models(data)   

jtm.write_models()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json_to_models-0.0.4.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

json_to_models-0.0.4-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page