Metadata-Version: 2.4
Name: shape_eval
Version: 1.1.0
Summary: object schema evaluation
Project-URL: Homepage, https://github.com/Auttcast/shape_eval
Project-URL: Issues, https://github.com/Auttcast/shape_eval/issues
Author-email: Brandon McCartney <auttcast@gmail.com>
License-Expression: AGPL-3.0-or-later
License-File: LICENSE.txt
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown

```
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.
