Skip to main content

Validator for RAC JSON Schemas

Project description

rac_schema_validator

Validators for RAC-specific JSONSchemas.

Requirements

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rac_schema_validator-1.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rac_schema_validator-1.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file rac_schema_validator-1.1.2.tar.gz.

File metadata

  • Download URL: rac_schema_validator-1.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for rac_schema_validator-1.1.2.tar.gz
Algorithm Hash digest
SHA256 83eb855e4e01af41d1c33aafecb5574177af1355264fc488b2110b5b5c68a60b
MD5 9536be088bffb5c6c655bb15df609715
BLAKE2b-256 a962ac5176e42e14054d42f59f2783528022066644d0e34e6f25b94fb05060ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_schema_validator-1.1.2.tar.gz:

Publisher: pythonpublish.yml on RockefellerArchiveCenter/rac_schema_validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rac_schema_validator-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for rac_schema_validator-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ecd949284fce4859f9bbee9ac0a53bb6bd070fe81c40780736c4dd41cc56546e
MD5 d4f827ec921b0fbe598e43cb83cd9ad7
BLAKE2b-256 1d51a69b449fd9fbff0651a1d2b7b26b44239ce1549dac1e7d29521e6eb757d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_schema_validator-1.1.2-py3-none-any.whl:

Publisher: pythonpublish.yml on RockefellerArchiveCenter/rac_schema_validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page