Easy use of the JSON SchemaStore from Python, as a referencing.Registry
Project description
schemastore.py
A collection of all JSON Schemas from the schemastore.org catalog, installable so they may be used without internet access.
Installation
Use your favorite package manager, e.g. via:
$ uv pip install schemastore
or
$ pip install schemastore
Usage
Schemas are made usable as a referencing.Registry.
It is available as:
import schemastore
registry = schemastore.registry()
and use any of the API from the aforementioned referencing package to make use of the schemas, such as:
print(registry.get_or_retrieve("https://json.schemastore.org/github-action.json").value)
though more typically you will use the registry alongside a JSON Schema validator such as those provided by the jsonschema library:
import jsonschema
import schemastore
# Validate whether the string "foo" is a valid GitHub actions workflow (it is not.)
jsonschema.validate(
'"foo"',
{"$ref": "https://json.schemastore.org/github-action.json"},
registry=schemastore.registry(),
)
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 schemastore-0.2.3.tar.gz.
File metadata
- Download URL: schemastore-0.2.3.tar.gz
- Upload date:
- Size: 6.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
904c4e5df11968c5c3cf91d08a2b7f5f833a3f449fca80470c395154aea8a1d2
|
|
| MD5 |
711add4913013db1a8305b76614ada7c
|
|
| BLAKE2b-256 |
dae1999c99abac1cefad1a92559c92fcab3ce17847a5b44f95737f3520d5d138
|
Provenance
The following attestation bundles were made for schemastore-0.2.3.tar.gz:
Publisher:
ci.yml on python-jsonschema/schemastore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schemastore-0.2.3.tar.gz -
Subject digest:
904c4e5df11968c5c3cf91d08a2b7f5f833a3f449fca80470c395154aea8a1d2 - Sigstore transparency entry: 166127120
- Sigstore integration time:
-
Permalink:
python-jsonschema/schemastore@c019aba719fca2d787cc81704a4ae2cc9f7b1b70 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/python-jsonschema
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c019aba719fca2d787cc81704a4ae2cc9f7b1b70 -
Trigger Event:
push
-
Statement type:
File details
Details for the file schemastore-0.2.3-py3-none-any.whl.
File metadata
- Download URL: schemastore-0.2.3-py3-none-any.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
049b62589e7cc3a11fa5d1977cdbf0524cf1c905a81cd0f9d27075b7578cf2d3
|
|
| MD5 |
3f15138b951ff38d8672601f247c8a70
|
|
| BLAKE2b-256 |
ce312d9c3ed7046c6869efb23a9d48e8968912ffe1150879793ec4ca78c08bae
|
Provenance
The following attestation bundles were made for schemastore-0.2.3-py3-none-any.whl:
Publisher:
ci.yml on python-jsonschema/schemastore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
schemastore-0.2.3-py3-none-any.whl -
Subject digest:
049b62589e7cc3a11fa5d1977cdbf0524cf1c905a81cd0f9d27075b7578cf2d3 - Sigstore transparency entry: 166127121
- Sigstore integration time:
-
Permalink:
python-jsonschema/schemastore@c019aba719fca2d787cc81704a4ae2cc9f7b1b70 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/python-jsonschema
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c019aba719fca2d787cc81704a4ae2cc9f7b1b70 -
Trigger Event:
push
-
Statement type: