Skip to main content
# 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:

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

# check contents of keyword argument `data_obj`
@schemas.check(data_obj='some-schema-file')
def my_function(data_obj=None):
...

# check return value of the function
@schemas.check('some-other-schema-file')
def my_function():
...

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

## Lincese

GNU/GPLv-3

Download files

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

Source Distribution

schemalib-1.0.1.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file schemalib-1.0.1.tar.gz.

File metadata

  • Download URL: schemalib-1.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for schemalib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d9b41ecedf72af5dacb133dcbba4419319cfa100578eb4939838446725cab671
MD5 335a4243a2644e053ff1ccac0f354786
BLAKE2b-256 71c877f5bbc10e713ecb9b250e8dd1d28190d8602851442c82b23bf8b73bf2e2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 file

1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page