Metadata-Version: 2.4
Name: validatejsonschema
Version: 0.1.1
Summary: An implementation of JSON Schema validation for Python
Author-email: Jenna Peterson <jennapeterson24@protonmail.com>
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# validatejsonschema

`validatejsonschema` is an implementation of the [JSON Schema](https://json-schema.org) specification for Python.

```python
from validatejsonschema import validate

# A sample schema, like what we'd get from json.load()
schema = {
    "type": "object",
    "properties": {
        "price": {"type": "number"},
        "name": {"type": "string"},
    },
}

# If no exception is raised by validate(), the instance is valid.
validate(instance={"name": "Eggs", "price": 34.99}, schema=schema)

validate(
    instance={"name": "Eggs", "price": "Invalid"}, schema=schema,
)
# Raises:
# ValidationError: 'Invalid' is not of type 'number'
```

It can also be used from the command line by installing  
[`check-jsonschema`](https://github.com/python-jsonschema/check-jsonschema).

---

## Installation

`validatejsonschema` is available on PyPI:

https://pypi.org/project/validatejsonschema/

Install via pip:

```bash
pip install validatejsonschema
```

---
