This release is a pre-release and may not be stable for production use.
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.
Companion turbo projects: pyshacl-turbo and rdflib-turbo.
uv add owlrl-turbo==0.1.0a3
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)
With rdflib-turbo's shared-validation release and the matching pyshacl-turbo
release, pass source directly to pyshacl_turbo.validate(source, shacl_graph=...). This retains the dataset used above; only the report becomes
an RDFLib graph. The canonical version benchmarks
compare this pipeline against the three original Python libraries and historical
turbo releases. Exact wheels, dependency locks, raw timings and RSS are retained.
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
Development uses native uv project commands and the committed uv.lock.
Run make dev to sync the project and test tools, then make check. Add or update
Python dependencies with uv add; run Ruff, mypy and pytest through uv run.
Build wheels and source distributions with uv build. The coverage and release
harnesses create isolated uv projects and install the exact built wheels.
The shared companion-project benchmark suite
compares the three turbo projects with their reference packages, including RDFS,
OWL-RL, native/RDFLib conversion and complete SHACL pipelines. With the three
repositories as siblings, run make benchmark-companions. Measurements use pinned
published wheels and separate timing and peak RSS workers.
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
uv run --locked --extra test pytest. Tests compare complete closures on bounded fixtures and exercise source
mutation, malformed inputs, standard RDF output and a pyshacl-turbo pipeline.
Coverage
Coverage badges update from successful main-branch CI measurements, including the daily scheduled run. Python lines and branches are separate; Rust badges measure owned native source exercised by Rust and Python integration tests. The Rust badges cover the shared rdflib-turbo runtime, including this project's tests.
CI requires 100% measured Python package line and branch coverage. Coverage is separate from full API compatibility and standards conformance.
Rust coverage of the shared runtime is measured by
rdflib-turbo's native coverage harness,
including this project's Python integration tests against an instrumented native
wheel. With sibling checkouts, run make test-rust-coverage. owlrl-turbo has no
separate Rust implementation; the shared-runtime result is not a Python coverage
percentage or a conformance claim.
Metadata
Release files for owlrl-turbo 0.1.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| owlrl_turbo-0.1.0a3.tar.gz | 72.6 kB | With provenance | Details for owlrl_turbo-0.1.0a3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| owlrl_turbo-0.1.0a3-py3-none-any.whl | Python 3 | none | any | Details for owlrl_turbo-0.1.0a3-py3-none-any.whl |
Total release size: 82.3 kB
Release files / owlrl_turbo-0.1.0a3.tar.gz
| Download URL | owlrl_turbo-0.1.0a3.tar.gz |
|---|---|
| Size | 72.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1876bfd3a8a59d0604e29d52e10b0f6ede4b8e300692dfb28e137d8f4ef314c
|
|
BLAKE2b-256 checksum How to use checksums |
b45b63e998bd7dc1ad21839ba61590271c9f10f45d5b66b47aed053d15b74bea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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 17, 2026.
Transparency logRelease files / owlrl_turbo-0.1.0a3-py3-none-any.whl
| Download URL | owlrl_turbo-0.1.0a3-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a93ac9d7bedce17d9d453a49e906dfee8c3d4a4bc16975f7723c183644fe0d9
|
|
BLAKE2b-256 checksum How to use checksums |
c45bcb1e710b1a6b9adc390914f32ec8e26ac554f726f40753817a2c5fa87d22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
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 17, 2026.
Transparency logSecurity for owlrl-turbo 0.1.0a3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for owlrl_turbo-0.1.0a3.tar.gz
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 17, 2026.
Transparency logA 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.