Skip to main content

Library for working with JSON Schemas

Project description

# schemalib

Schemalib is a library for simple handling and usage of JSON schemas in your code. Simply define
a schema library with paths from which to load the schemas and then use the `check` decorator provided
by the object instance to perform actual checking against that schema library. Relative or absolute paths
can be specified, there's also a support for loading schemas relative to a Python module (Python's module load
order applies here).

## Examples:

from schemalib import SchemaLibrary
schemas = SchemaLibrary('/my/schema/path', 'package://my.python.package')

# check contents of keyword argument `data_obj`
def my_function(data_obj=None):

# check return value of the function
def my_function():

# check both
@schemas.check('some-other-schema-file', data_obj='some-schema-file')
def my_function(data_obj=None):

## Lincese


Project details

Download files

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

Files for schemalib, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size schemalib-1.0.1.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page