Skip to main content

Get jsonschema from sample records

Project description

Build Status

💥 New: jsonpath support for the record_level parameter in getschema.infer_schema function.

getschema

Get jsonschema from sample records

Command line usage:

usage: getschema [-h] [--indent INDENT] [--type TYPE] [--skip SKIP] [--lower]
                 [--replace_special REPLACE_SPECIAL] [--snakecase]
                 data

positional arguments:
  data                  json record file

optional arguments:
  -h, --help            show this help message and exit
  --indent INDENT, -i INDENT
                        Number of spaces for indentation
  --type TYPE, -t TYPE  Record format (json, yaml, csv)
  --skip SKIP, -s SKIP  Skip first n records. Don't skip the header row.
  --lower, -l           Convert the keys to lower case'
  --replace_special REPLACE_SPECIAL, -r REPLACE_SPECIAL
                        Replace special characters in the keys with the
                        specified string
  --snakecase, -n       Convert the keys to 'snake_case'
getschema file.json

Module functions: (See impl.py)

  • infer_schema
  • infer_from_json_file
  • infer_from_yaml_file
  • infer_from_csv_file
  • fix_type

Example projects using getschema:

Original repository

About this project

This project is developed by ANELEN and friends. Please check out the ANELEN's open innovation philosophy and other projects

ANELEN

Copyright © 2020~ Anelen Co., LLC

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

getschema-0.2.9.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

getschema-0.2.9-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file getschema-0.2.9.tar.gz.

File metadata

  • Download URL: getschema-0.2.9.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for getschema-0.2.9.tar.gz
Algorithm Hash digest
SHA256 ce562884b58604b23f751dde387482552acfb21296d2ad82ddbac20d56b377c3
MD5 757d7222ae624aaae7f6ab6b0a8e4ee9
BLAKE2b-256 78d454023ce7feb56eb03dee71a100fc9d8d6e73a7cf896b30226e0d78672b5a

See more details on using hashes here.

File details

Details for the file getschema-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: getschema-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for getschema-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 586081e314f8d1b4f4d15c8a6bc42d0c6e4f28dcd50a13252dfbae3aee2a4d03
MD5 113e39445de7dc1f433ff99a4f968929
BLAKE2b-256 9875f215200ec934ca1ed1aafb3bbdef27dfab4f2df38d7d2dde77ca8c9a6adb

See more details on using hashes here.

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