/jsonschema-default

A Python package that creates default objects from a JSON schema

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

jsonschema-instance

A Python package that creates default objects from a JSON schema.

Note

This is not a validator. Inputs should be valid JSON schemas. For Python you can use the jsonschema package to validate schemas.

Installation

pip install jsonschema-default

Usage

import jsonschema_default

default_obj = jsonschema_default.create_from("<schema>")

Development

  • Install and configure Poetry
pip install --user poetry

See Installation for the official guide.

  • Install the dependencies using
# Configure poetry to create a local venv directory
poetry config virtualenvs.in-project true

poetry install