Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

rac_schemas

JSON schemas and validation helpers.

Requirements

  • Python 3.4 or higher

  • jsonschema

  • tox (for running tests)

  • pre-commit (for running linters before committing)

    • After installing pre-commit, install the git-hook scripts:
    $ pre-commit install
    

Installation

The recommended way to install this package is using pip:

pip install rac_schemas

Usage

This library has one main public method, is_valid(), which takes a dict as the first argument and a schema filename as the second.

from rac_schemas import is_valid

data = {"key": "value" ... }
is_valid(data, "object.json")

rac_schemas will attempt to add an appropriate extension to schema filenames in cases where it is either missing or incorrect. For example, if either schema and schema.org as schema filenames, rac_schemas will attempt to open schema.json.

Invalid data will raise a jsonschema.exceptions.ValidationError, and an invalid schema filename will raise a FileNotFoundError.

Available schemas

All schemas are located in the schemas/ subdirectory of the rac_schemas/ directory.

Tests

rac_schemas 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.

Documentation

Automatically generated HTML documentation in the docs/ directory based upon .json files in the schemas/ subdirectory of the rac_schemas/ directory.

A simplified overview of the data model is below:

Simplified data model overwiew

Requirements

Usage

Running generate_docs.py will iterate over the schemas/ subdirectory and write updated docs files to the docs/ directory.

License

Code is released under an MIT license. SeeLICENSE.md.

Metadata

Release files for rac-schemas 0.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rac-schemas 0.30
File Size Uploaded Provenance Actions
rac_schemas-0.30.tar.gz 11.7 kB Without provenance Details for rac_schemas-0.30.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rac-schemas 0.30
File Interpreter ABI Platform Actions
rac_schemas-0.30-py3-none-any.whl Python 3 none any Details for rac_schemas-0.30-py3-none-any.whl

Total release size: 30.1 kB

Release files / rac_schemas-0.30.tar.gz

Download URL rac_schemas-0.30.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bf96b7b44d533d5f07018ac149b199225de0e32e51659b38ea4d01777def2db8
BLAKE2b-256 checksum
How to use checksums
62a91788d826c91f7f4e96301d8e04ef93bf696f85a5bd61a51338967abb0f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / rac_schemas-0.30-py3-none-any.whl

Download URL rac_schemas-0.30-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23cdc29a973650a90b062a7809d04a0bf3b89c0cd5906b0dd66ab605dcdac576
BLAKE2b-256 checksum
How to use checksums
6bea5fb8886bfe27105d7ffd7f64657402e85fae9540e908098f9b4d128fc5c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Security for rac-schemas 0.30

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page