Skip to main content

JSON Schema builder

Project description

Build JSON schemas easily in Python.

See documentation for more informations.

License Development Status Latest release Supported Python versions Supported Python implementations Download format Build status Code test coverage Code Health

Installation

pip install jsonschema-builder

Usage

import jsonschema
import jsb

schema = jsb.typed(
    jsb.schema(id='/schemas/myschema#', meta=jsb.draft04()),
    type='object',
    properties={
        'foo': jsb.typed(jsb.schema(), type='string'),
        'bar': jsb.typed(jsb.schema(), type='integer')
    }
)
data = {
    'foo': 'bar',
    'bar': 42
}

jsonschema.validate(data, schema)

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

jsonschema-builder-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

jsonschema_builder-0.1.1-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

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