Version: 0.0.6 (stable)
agrag.schema.formats
Import and export schemas in other formats.
Modules:
- dispatch – Hooks that let
load_schemaread Pydantic classes and Turtle files. - errors – Errors raised by schema format importers.
- json_schema – Export a GraphSchema as a JSON Schema (draft 2020-12) for extraction output.
- jsonld – Export GraphSchema declarations as a JSON-LD OWL vocabulary.
- owl – Import the supported OWL and RDFS Turtle subset.
- pydantic_models – Import a GraphSchema from Pydantic model classes.
- result – The value that every schema import returns.
- shacl – Export a GraphSchema as SHACL shapes in Turtle syntax.
Classes:
- FormatWarning – One thing an import dropped, changed or could not map.
- ImportResult – A schema read from another format, with everything the read lost.
- SchemaFormatError – An input document cannot be imported as a supported schema format.
- SchemaFormatMissingExtraError – An optional package required by a schema format is not installed.
Functions:
- from_pydantic – Read a schema from Pydantic model classes.
- load_owl – Load the supported OWL/RDFS subset from a local UTF-8 Turtle file.
- loads_owl – Load the supported OWL/RDFS subset from Turtle text.
- to_json_schema – Export a schema as a JSON Schema that checks a plain extraction document.
- to_jsonld – Return a JSON-LD OWL vocabulary for a graph schema.
- to_shacl – Export a schema as SHACL shapes in Turtle syntax.