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.3.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.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rac_schema_validator-1.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 57faafb049f46048df1d7444e3d91021c559f63ff83e1dd283ecb6dfca1a6b89
MD5 0cdf5158ff1d1217e94e88cae2464765
BLAKE2b-256 7c9c1cafd8308eaf497cc5e7b3fe7711960a51fc9c1b1ab985832fd0d6db5489

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_schema_validator-1.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for rac_schema_validator-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d52ffed330b3ed534d1aecf54880b94ccbe734edaa93109dd431c24e3daa41c
MD5 9cb651be5987a38062c38562dc0dd7f1
BLAKE2b-256 bb4240de136289acd68a2578c1d32db2357d9632fda07021d2d9ceabb601cf8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rac_schema_validator-1.1.3-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