Skip to main content
Version: latest

agrag.schema.formats

Import and export schemas in other formats.

Modules:

  • dispatch – Hooks that let load_schema read 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:

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.