Skip to main content

object schema evaluation

Project description

pip install shape_eval

Guide

Schema Evaluation - shape(...)

from shape_eval.service import shape

model = [
  {'id': 1, 'name': "a", 'data': {'detail': "some string"} },
  {'id': 2, 'name': "b", 'data': {'detail': 123} },
  {'id': 3, 'name': "c", 'data': None }
]

shape(model)
[{'data?': {'detail': 'str|int'}, 'id': 'int', 'name': 'str'}]
  • Nullable properties have '?' appended at the end.
  • Values are replaced with string representation of data type.
  • If more than one data type is found, like the 'detail' property, union format is used.

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

shape_eval-1.0.1.tar.gz (56.0 kB view details)

Uploaded Source

Built Distribution

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

shape_eval-1.0.1-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file shape_eval-1.0.1.tar.gz.

File metadata

  • Download URL: shape_eval-1.0.1.tar.gz
  • Upload date:
  • Size: 56.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for shape_eval-1.0.1.tar.gz
Algorithm Hash digest
SHA256 184819cd2ae7dfc61f222ed03282ae2b6afe95d311e1ed0aa3e9646a435890f5
MD5 0af123f07be532f7b18fbca345a484ea
BLAKE2b-256 472772a6b6da615b21deede34333835c4fe1c340b660a6ac13ffdcfea9f28757

See more details on using hashes here.

File details

Details for the file shape_eval-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: shape_eval-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for shape_eval-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e3d1b64a83ecc7f8122c5e0f36170c829a9e1e6c2249eb7a4f27f00e63a47b9
MD5 bee74bf5312d00210d53ecbbc39efea5
BLAKE2b-256 10e7c1a58736d23df87dc9ac2625c363a5c877f7bf6c315b31f613121ed7d4da

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