Schema Tools
Collection of tools to parse, query, map,... Json/Yaml schemas
Schema Tools is a collection of utilities to load, parse, query, dereference
and map Json and Yaml schemas, with support for UBL / Schematron / PEPPOL
document validation on top. It ships a CLI (schema-tools) and an optional
web-based schema viewer.
Features
- (loading of) Json and Yaml schemas with line/column-preserving Abstract Syntax Tree access
- a schema-oriented object model with
$refresolving, dereferencing and mapping - selection, dependency extraction and round-trip (de)serialization
- UBL document validation (XSD + Schematron) with PEPPOL billing rules
Installation
Using pip:
pip install schema-tools
Using uv:
uv add schema-tools
Quick Start
>>> from schema_tools import json
>>> j = json.loads('''{
... "hello" : "world",
... "count" : [ 1, 2, 3 ]
... }''')
>>> j
ObjectNode(len=2, line=1, column=1)
>>> j()
{'hello': 'world', 'count': [1, 2, 3]}
Documentation
Full documentation available at schema-tools.readthedocs.io.
Development
make env-dev # Install all dependencies
make test # Run tests
make lint # Run linter
make typecheck # Run type checker
make check # Run all quality checks
make docs # Build documentation
License
MIT License - see LICENSE for details.
Metadata
Release files for schema-tools 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| schema_tools-0.4.0.tar.gz | 498.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| schema_tools-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.0 MB
Release files / schema_tools-0.4.0.tar.gz
| Download URL | schema_tools-0.4.0.tar.gz |
|---|---|
| Size | 498.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a3120d1dd20243114d38511be9cc9a21185fbe3dfb0efb4bbec117f19646b31
|
|
BLAKE2b-256 checksum How to use checksums |
3b2d6b1c82cc9693eea295f841fb4dd0631b4fc223d448e5a0a11f5ca4a3f4d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / schema_tools-0.4.0-py3-none-any.whl
| Download URL | schema_tools-0.4.0-py3-none-any.whl |
|---|---|
| Size | 546.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44dd6c4b1a591041074ce8b4243265c31f7d5faff64fec8c9dcfd92a1337305d
|
|
BLAKE2b-256 checksum How to use checksums |
3e0d30fcae5cb001e29af51899bbb2fcb405080a986f7161785420bb0caa9f00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|