Metadata-Version: 2.0
Name: jsonschema-builder
Version: 0.1.1
Summary: JSON Schema builder
Home-page: https://git.link-society.com/link-society/jsonschema-builder
Author: Link Society
Author-email: contact@link-society.com
License: Apache
Description-Content-Type: UNKNOWN
Keywords: json schema
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Dist: addict (>=2.1.2)
Requires-Dist: pytest-runner (>=3.0)

JSON Schema Builder
===================

Build `JSON schemas <http://json-schema.org>`_ easily in Python.

See documentation_ for more informations.

.. _documentation: https://jsonschema-builder.readthedocs.io

.. image:: https://img.shields.io/pypi/l/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder/
   :alt: License

.. image:: https://img.shields.io/pypi/status/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder/
   :alt: Development Status

.. image:: https://img.shields.io/pypi/v/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder/
   :alt: Latest release

.. image:: https://img.shields.io/pypi/pyversions/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder/
   :alt: Supported Python versions

.. image:: https://img.shields.io/pypi/implementation/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder/
   :alt: Supported Python implementations

.. image:: https://img.shields.io/pypi/wheel/jsonschema-builder.svg?style=flat-square
   :target: https://pypi.python.org/pypi/jsonschema-builder
   :alt: Download format

.. image:: https://travis-ci.org/link-society/jsonschema-builder.svg?branch=master&style=flat-square
   :target: https://travis-ci.org/link-society/jsonschema-builder
   :alt: Build status

.. image:: https://coveralls.io/repos/github/link-society/jsonschema-builder/badge.svg?style=flat-square
   :target: https://coveralls.io/r/link-society/jsonschema-builder
   :alt: Code test coverage

.. image:: https://landscape.io/github/link-society/jsonschema-builder/master/landscape.svg?style=flat-square
   :target: https://landscape.io/github/link-society/jsonschema-builder/master
   :alt: Code Health

Installation
------------

.. code-block:: text

   pip install jsonschema-builder

Usage
-----

.. code-block:: python

   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)


