Skip to main content

RDF support for Hydra

Project description

Hydra-RDF

hydra-rdf is the translingual RDF support package for Hydra. It is generated into Haskell, Java, and Python from a common set of DSL sources, and depends only on hydra-kernel.

For background on how Hydra relates to RDF and SHACL, see the RDF wiki page.

What it provides

  • RDF 1.1 syntax model — IRIs, literals, blank nodes, triples, graphs, datasets.
  • SHACL syntax model and coder — maps Hydra types to SHACL shapes and Hydra terms to RDF descriptions (the data triples that conform to those shapes).
  • OWL 2 syntax model — full coverage of OWL 2 classes, properties, individuals, and axioms. Syntax only; there is no OWL coder yet.
  • ShEx syntax model.
  • XML Schema syntax model.
  • N-Triples serializer (rdfGraphToNtriples) — the only output format currently supported. Reading (parsing) of any RDF format is not yet supported.

Demos

Three demos exercise this package end-to-end:

  • demos/shacl — generates SHACL shapes from the Hydra kernel types, encodes kernel modules as N-Triples, and validates the data against the shapes.
  • demos/avro — bidirectional Avro coder; the included AvroWorkflows tool transforms Avro-schema'd JSON data into SHACL RDF.
  • demos/genpg — generates a property graph from relational CSV data and emits it as either GraphSON or RDF/SHACL N-Triples.

N-Triples output

The serializer follows the N-Triples 1.1 specification. Literals preserve all Unicode verbatim and escape only ", \, LF, and CR. IRIs emit any of the spec-disallowed characters (controls and <>"{}|^\) as \uXXXXUCHAR escapes; all other code points pass through. Earlier versions replaced any non-ASCII character with?`; that bug was fixed in #363.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydra_rdf-0.16.0.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hydra_rdf-0.16.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file hydra_rdf-0.16.0.tar.gz.

File metadata

  • Download URL: hydra_rdf-0.16.0.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hydra_rdf-0.16.0.tar.gz
Algorithm Hash digest
SHA256 aeba504b0ed7b3a3ed1e1643aba353d3ad5e4bd1b5a8bd05277670ef485839d6
MD5 aeee89f8f19aebf3a51ba694f36e9c10
BLAKE2b-256 89cb874aef0f021f9a963ecbe1e68d590c8e6b66f261e4e0249b1c4935ad1972

See more details on using hashes here.

File details

Details for the file hydra_rdf-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: hydra_rdf-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for hydra_rdf-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e0157447d4c497d585e49f0ef48c64a3f7f49785c42f373dd6b9881119c3819
MD5 7e562eff34004edb90a16c5fe2f30dff
BLAKE2b-256 2fe93038cdad25dfeafd57d177d5ad66a0a85c3a8be4cf8b2912418c84436566

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page