Validator for RAC JSON Schemas
Project description
rac_schema_validator
Validators for RAC JSONSchemas.
Requirements
- Python 3.10 or greater
- jsonschema
- tox (for running tests)
- pre-commit (for running linters before committing)
Installation
The recommended way to install this package is using pip:
pip install rac_schema_validator
After installing pre-commit, install the git-hook scripts:
$ pre-commit install
Usage
This library has one main public method, is_valid(), which takes two required
arguments:
- the data to be validated
- the JSONSchema to validate against
and a third optional argument:
- a base schema to resolve references against (see official docs)
from rac_schema_validator import is_valid
data = {"key": "value" ... }
schema = { ... }
is_valid(data, schema)
Invalid data will raise a rac_schema_validator.exceptions.ValidationError, and
an invalid schema will raise a jsonschema.exceptions.SchemaError.
Tests
rac_schema_validator comes with unit tests as well as linting. The easiest way
to make sure all tests pass is to run tox from the root of the repository.
This will execute all tests, and will also run autopep8 and flake8 linters
against the codebase.
License
Code is released under an MIT license. SeeLICENSE.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rac_schema_validator-1.0.tar.gz.
File metadata
- Download URL: rac_schema_validator-1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf79bd32d7dfbfa62791c768d89f5347a0555f3eef8c6786c1290887e4912d4
|
|
| MD5 |
dc185ae4a0a65208c618b1fc63042576
|
|
| BLAKE2b-256 |
a70adb056a7700e0bcf35d739b4164679584f139c6c6964a177348125e9e89d8
|
Provenance
The following attestation bundles were made for rac_schema_validator-1.0.tar.gz:
Publisher:
pythonpublish.yml on RockefellerArchiveCenter/rac_schema_validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rac_schema_validator-1.0.tar.gz -
Subject digest:
dbf79bd32d7dfbfa62791c768d89f5347a0555f3eef8c6786c1290887e4912d4 - Sigstore transparency entry: 150832146
- Sigstore integration time:
-
Permalink:
RockefellerArchiveCenter/rac_schema_validator@cfd6664ec49ccac26f6c352424427d9a6aaf2712 -
Branch / Tag:
refs/heads/base - Owner: https://github.com/RockefellerArchiveCenter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@cfd6664ec49ccac26f6c352424427d9a6aaf2712 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rac_schema_validator-1.0-py3-none-any.whl.
File metadata
- Download URL: rac_schema_validator-1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fb51539722558e6d3c197f1fe0e35c9a51bc85c154db679f98161f2cd6525a6
|
|
| MD5 |
a11e9e3335a697e261ec01103dc6b62e
|
|
| BLAKE2b-256 |
f578ebde9509fd0baaa4b754c3e5f2046cf17f0c1e1d8b89b793fef1911623cc
|
Provenance
The following attestation bundles were made for rac_schema_validator-1.0-py3-none-any.whl:
Publisher:
pythonpublish.yml on RockefellerArchiveCenter/rac_schema_validator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rac_schema_validator-1.0-py3-none-any.whl -
Subject digest:
6fb51539722558e6d3c197f1fe0e35c9a51bc85c154db679f98161f2cd6525a6 - Sigstore transparency entry: 150832147
- Sigstore integration time:
-
Permalink:
RockefellerArchiveCenter/rac_schema_validator@cfd6664ec49ccac26f6c352424427d9a6aaf2712 -
Branch / Tag:
refs/heads/base - Owner: https://github.com/RockefellerArchiveCenter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pythonpublish.yml@cfd6664ec49ccac26f6c352424427d9a6aaf2712 -
Trigger Event:
workflow_dispatch
-
Statement type: