Skip to main content

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.

Documentation Status Build Status

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 details)

Uploaded Python 3

File details

Details for the file momoa-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: momoa-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Linux/5.15.0-56-generic

File hashes

Hashes for momoa-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 346a1f16ff085fc3d62f33416b391d29d34c5626d8867370ecc6e54cda15a695
MD5 872c780dc1a3a21bce4bc576b0b2042e
BLAKE2b-256 5a56d70c2864a0ca2073be8c50a5b851fc2ff2e910402817df362dcc0c6adbc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page