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.2.tar.gz (56.1 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.2-py3-none-any.whl (57.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shape_eval-1.0.2.tar.gz
  • Upload date:
  • Size: 56.1 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.2.tar.gz
Algorithm Hash digest
SHA256 af768e074445264a06d62d48ce6b6034786b6433a1d9cf7c61e1c564aa11e3f2
MD5 2d17adf2813eedfb06c87effc8e61cd7
BLAKE2b-256 7e10cdd37a10371c48e99f48ceddc97b5d9e31f724d0f8e3bb0d4f327dae19cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shape_eval-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 57.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6b8e692e5bb10087f2f56c88a6e0981b521fbb7a685d627c8328b7b488f7133
MD5 db0ea53448a7a900cbe2792e80fef88e
BLAKE2b-256 da5052af113af5096ce8d6a44fdda0224df8eb7e12518786ead527cb8d3c6606

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