Skip to main content

Hydra-RDF

hydra-rdf is the translingual RDF support package for Hydra. It is generated into Haskell, Java, Python, and TypeScript 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.
  • Eclipse RDF4j overlay (hydra.overlay.java.rdf.SerdeNative) — a host-native Java integration that serializes Hydra RDF graphs (hydra.rdf.syntax.*) via RDF4j's Rio writers (and supports the reverse). Hand-written, host-specific code: it lives under overlay/java/hydra-rdf/ and is copied onto the generated distribution at assembly time (#511; formerly the separate bindings/java/hydra-rdf4j artifact). Its third-party dependency (org.eclipse.rdf4j:rdf4j-rio-ntriples) is declared in overlay/java/hydra-rdf/build.json.

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.

Metadata

Release files for hydra-rdf 0.17.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hydra-rdf 0.17.7
File Size Uploaded Provenance Actions
hydra_rdf-0.17.7.tar.gz 55.9 kB Without provenance Details for hydra_rdf-0.17.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hydra-rdf 0.17.7
File Interpreter ABI Platform Actions
hydra_rdf-0.17.7-py3-none-any.whl Python 3 none any Details for hydra_rdf-0.17.7-py3-none-any.whl

Total release size: 112.5 kB

Release files / hydra_rdf-0.17.7.tar.gz

Download URL hydra_rdf-0.17.7.tar.gz
Size 55.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bb72495512fe02487fc1c086df687fac47c7e7affc163716bd5eb9308c30c69c
BLAKE2b-256 checksum
How to use checksums
1281194e60edf20091624ffa58089e7c9d6f9947f8e70ad5453ac4de1640482d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / hydra_rdf-0.17.7-py3-none-any.whl

Download URL hydra_rdf-0.17.7-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
109afcecbf77811bcc1552940c448076cd06871261b21cce34899c828e9d7a5a
BLAKE2b-256 checksum
How to use checksums
72f458b9333263d37046712537314716b9a866c3e6b95ec72c94fc4db5bc70bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for hydra-rdf 0.17.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page