jsonschema-builder 0.1.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

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)

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.