JSON Schema builder
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for jsonschema_builder-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99785f7b24be1159020ea210403b9eff3f488630c45c1b5bd473a424e866ced2 |
|
MD5 | 25de36b1ad80c5f71c65e3e2f6ffdfa5 |
|
BLAKE2b-256 | 3dfa64da23a4e3b0b236ebc71cfed8b6df8bb87e5af3529d9f90d0302811d8c2 |