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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file json_to_models-0.0.4.tar.gz.

File metadata

  • Download URL: json_to_models-0.0.4.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for json_to_models-0.0.4.tar.gz
Algorithm Hash digest
SHA256 65c4dfb34784739b9b897f6ea04ea2d57ff475680a522835bf9b5288ea24709b
MD5 27a02b6e3f06dbffd1226d0620968353
BLAKE2b-256 20cbebfdb10de8bc435560d5d6f493895c3e2bc8b347e89653f5bca2185fb2a1

See more details on using hashes here.

File details

Details for the file json_to_models-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: json_to_models-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for json_to_models-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f2598288c9014ff85d6e74776270d5e03433eea13f59d4579699ed50716aafcd
MD5 2313d82db6167cafa65d35abe7561311
BLAKE2b-256 95f5843cb22560da6890769194161e87e1fa1f0abc8b3f035b902692f47951f7

See more details on using hashes here.

Supported by

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