jsonschemabuilder 0.1.1
Build JSON schemas easily in Python.
See documentation for more informations.
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)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.