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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file jsonschema-builder-0.1.1.tar.gz.

File metadata

File hashes

Hashes for jsonschema-builder-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fa2eaa4e69effff4495c6abe8d93bfc22ed27b8de3a46a19b1d5fbc1dfb3bc13
MD5 822d87b8bf3e09b7d5dbdaa840eeaa1a
BLAKE2b-256 67e4c9f806675c901f72e24d4974431b08120d988bcc9657db523ad931c95391

See more details on using hashes here.

File details

Details for the file jsonschema_builder-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jsonschema_builder-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99785f7b24be1159020ea210403b9eff3f488630c45c1b5bd473a424e866ced2
MD5 25de36b1ad80c5f71c65e3e2f6ffdfa5
BLAKE2b-256 3dfa64da23a4e3b0b236ebc71cfed8b6df8bb87e5af3529d9f90d0302811d8c2

See more details on using hashes here.

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