Metadata-Version: 2.1
Name: momoa
Version: 0.2.3
Summary: A library for definition, validation and serialisation of Python objects based on JSONSchema specifications.
Home-page: https://momoa.readthedocs.io
Author-Email: Berislav Lopac <berislav@lopac.net>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: File Formats :: JSON :: JSON Schema
Project-URL: Homepage, https://momoa.readthedocs.io
Project-URL: Repository, https://github.com/berislavlopac/momoa
Requires-Python: <4.0,>=3.8
Requires-Dist: statham-schema>=0.13.5
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pyhumps>=3.8.0
Requires-Dist: mkapi>=1.0.14; extra == "docs"
Requires-Dist: mkdocs>=1.5.3; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.17; extra == "docs"
Requires-Dist: jinja2>=3.1.3; extra == "docs"
Provides-Extra: docs
Description-Content-Type: text/markdown

# Momoa

A library for definition, validation and serialisation of models based on JSON Schema specifications.

[![Documentation Status](https://readthedocs.org/projects/momoa/badge/?version=latest)](https://momoa.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://b11c.semaphoreci.com/badges/momoa/branches/main.svg?style=shields&key=3e80692d-ad00-401e-b445-75303b8f35d0)](https://b11c.semaphoreci.com/projects/momoa)

## Basic Usage

```python
from datetime import datetime
from momoa import Schema
from momoa.model import UNDEFINED

schema = Schema.from_uri("file://path/to/schema.json")
PersonModel = schema.model

birthday = datetime(1969, 11, 23)
person = PersonModel(firstName="Boris", lastName="Harrison", birthday=birthday)

assert person.age is UNDEFINED
assert person.birthday is UNDEFINED

person.age = 53
person.birthday = datetime(1969, 11, 23)

assert person.age == 53
assert person.birthday == datetime(1969, 11, 23)
```

## Compatibility

For validating schemas Momoa depends on [Statham](https://statham-schema.readthedocs.io), which [supports](https://statham-schema.readthedocs.io/en/latest/compatibility.html) the [JSON Schema Draft 6 specification](https://json-schema.org/specification-links.html#draft-6).
