Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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


Release history Release notifications

This version

0.1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jsonschema-builder, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size jsonschema_builder-0.1.1-py3-none-any.whl (8.7 kB) File type Wheel Python version 3.6 Upload date Hashes View hashes
Filename, size jsonschema-builder-0.1.1.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page