Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

owlrl-turbo

PyPI Tests and wheels

Companion turbo projects: pyshacl-turbo, rdflib-turbo and owlrl-turbo.

Functional alpha of native RDFS and OWL-RL materialization for Python. Uses the shared exact-term dataset runtime provided by rdflib-turbo, with native inference extracted from pyshacl-turbo. There is no runtime dependency on Python owlrl or pyshacl-turbo and no Python inference fallback.

pip install owlrl-turbo==0.1.0a2
from rdflib_turbo import Dataset
from owlrl_turbo import expand

source = Dataset().parse(data='''
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    <urn:Person> rdfs:subClassOf <urn:Agent> .
    <urn:alice> a <urn:Person> .
''')
expanded = expand(source, inference="rdfs")
assert bool(expanded.query('ASK { <urn:alice> a <urn:Agent> }'))
assert len(source) == 2  # the default leaves the source unchanged

# Reuse the existing dataset handle and commit only on successful inference.
expand(source, inference="owlrl", inplace=True)

expand(graph, inference="owlrl", inplace=False, destination=None) accepts rdflib_turbo.Dataset or RDFLib Graph/Dataset. Modes are rdfs, owlrl and both. The return value has the input kind. Native inputs remain native between calls; RDFLib inputs require a copy into the native runtime and conversion back. RDFLib namespaces and blank-node identities are preserved. Named input contexts are retained. RDFLib Dataset inference defaults to urn:owlrl-turbo:inference; use destination to explicitly name the output graph for Dataset inputs.

Native operations release the GIL and hold a dataset lock throughout execution. Inference commits only after successful native execution. Errors leave the source unchanged. RDFLib inplace commits occur after native success, using RDFLib's normal mutation API; external RDFLib stores do not acquire a new transaction guarantee.

This is not a complete drop-in owlrl replacement. DeductiveClosure classes, custom Python rule hooks, owl:imports loading, configurable axiom/datatype options, OWL-RL extensions and complete inconsistency diagnostics are not exposed. Inference initialization follows pyshacl-turbo's pinned modes, rather than configurable owlrl constructor flags. Full OWL-RL conformance and output parity are not claimed.

Output stays within standard RDF: literal subjects and non-IRI predicates are excluded. Valid literal-valued consequences remain part of the contract. Native owl:hasKey checks every property, intentionally differing from the pinned Python reasoner's incomplete comparison. See ADR 0001.

For SHACL, pass expanded.to_rdflib() to pyshacl_turbo.validate(). This conversion copies; pyshacl-turbo does not yet share the new dataset handle. No speedup claims are made for this initial release. Requires Python 3.11+; rdflib-turbo supplies the native platform wheel or builds its extension from source.

MIT OR Apache-2.0. Copyright 2026 DataRoad Inc, Delaware, USA, trading as Legra.

Development

Use make dev and make check. The initial alpha is published only by the verified GitHub Actions workflow; see release instructions.

Install rdflib-turbo first, then install this project with its test extra and run pytest. Tests compare complete closures on bounded fixtures and exercise source mutation, malformed inputs, standard RDF output and a pyshacl-turbo pipeline.

CI requires 100% measured Python package line and branch coverage. This does not measure Rust coverage, full API compatibility or standards conformance.

Metadata

Release files for owlrl-turbo 0.1.0a2

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

Source distribution (sdist)

Source distribution for owlrl-turbo 0.1.0a2
File Size Uploaded
owlrl_turbo-0.1.0a2.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for owlrl-turbo 0.1.0a2
File Interpreter ABI Platform
owlrl_turbo-0.1.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 28.6 kB

Release files / owlrl_turbo-0.1.0a2.tar.gz

Download URL owlrl_turbo-0.1.0a2.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e3c4146162d006c26bd0cc5d396823b870b589e8f6611e245be6ab14c1890d71
BLAKE2b-256 checksum
How to use checksums
47ce3290ec87a64131a774cf74839924fb0225a0871233109217cd25af76e5ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / owlrl_turbo-0.1.0a2-py3-none-any.whl

Download URL owlrl_turbo-0.1.0a2-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae088a6cf950a725e1544714813b732f00b51f0643c0d531d97e6d5df3471ab4
BLAKE2b-256 checksum
How to use checksums
c0780983bd16293f5ce19bedcf36bd3c9c8967f09ce746759cb1621af6e73c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

2 release files

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