A library for definition, validation and serialisation of Python objects based on JSONSchema specifications.
Project description
Momoa
A library for definition, validation and serialisation of models based on JSON Schema specifications.
Basic Usage
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
momoa-0.1.2-py3-none-any.whl
(5.4 kB
view hashes)