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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rac_schema_validator-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f0fd5fceba7d3fb19cb7878782693d9e3568894d7d17f04d8858754cb3113e52
MD5 212a99ea31abfcb201102132e3a6ff8e
BLAKE2b-256 9589521f1c16ead05e61c46f2beee6e0aeaa4e26513ab00b3d370fa42e06bf86

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for rac_schema_validator-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76417352df3104cb1a6e7958a8491fe1b2a9d0af29201dd9001cbce2fb6a98e6
MD5 f27c3d16bdb24a79f9118ffe8b032508
BLAKE2b-256 a80d50340d28ef60e1fa5734cbd0be0d1e186cf3c12dbf3aa6693842055b6df7

See more details on using hashes here.

Provenance

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