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.0.tar.gz (55.8 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.0-py3-none-any.whl (57.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shape_eval-1.0.0.tar.gz
  • Upload date:
  • Size: 55.8 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.0.tar.gz
Algorithm Hash digest
SHA256 f0d3d9c4cddc40c0295e9f3dbcfb3a6135aeabfebde4f478bedd1c0a22ef14bd
MD5 d707876bda5b3153f5ddfbc8e189bf40
BLAKE2b-256 13bd971185b363a18dde1442b82a31e172f02ff5cdfbbe1006da09ce820af4d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shape_eval-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 57.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dd9695837214520af78ead29eb0b1cfac1102e986e1defc410ba2b8fa08d79f
MD5 67b936db7c127b282b6b450f247b4112
BLAKE2b-256 18981e09fd992b35cc0e0309c50ad5c915c2a980b957b67de6d563775cd5158e

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