jsonschema-specifications
#
JSON support files from the JSON Schema Specifications (metaschemas, vocabularies, etc.), packaged for runtime access from Python as a referencing-based Schema Registry.
Resources are exposed via a referencing.Registry
.
Usage#
There is essentially one main object provided, jsonschema_specifications.REGISTRY
, which is a referencing.Registry
(or more specifically a referencing.jsonschema.SchemaRegistry
) containing all of the “official” JSON Schemas.
For full details on using it, see the referencing documentation
, but for example:
from jsonschema_specifications import REGISTRY as SPECIFICATIONS
DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema"
print(SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI))
# -> prints the Draft 2020-12 meta-schema