This release is a pre-release and may not be stable for production use.
rdflib-turbo
Functional alpha of a native RDF dataset runtime for Python, built on Oxigraph and exact-term compatibility work extracted from pyshacl-turbo.
Companion turbo projects: pyshacl-turbo and owlrl-turbo.
uv add rdflib-turbo==0.2.0a1
from rdflib_turbo import Dataset
# The data stays native between parsing, querying and owlrl-turbo inference.
data = Dataset().parse(data='<urn:alice> <urn:name> "Alice" .')
for row in data.query('SELECT ?name WHERE { <urn:alice> <urn:name> ?name }'):
print(row.name)
print(data.serialize(format="nquads"))
The alpha provides native parsing and serialization, SELECT/ASK/CONSTRUCT/DESCRIBE, exact literal spellings and datatype identity, named graphs, independent copies, and explicit RDFLib conversion. Query results are RDFLib Result objects; returned terms are Python RDFLib objects. Native operations release Python's GIL. A lock covers each complete native read or write. Parsing and inference commit only on success. Parsing separate documents gives blank nodes separate scopes.
Supported format names: turtle, nt, nquads, trig, xml, n3, json-ld. Input is UTF-8 text, bytes or a local path; source URLs and file objects are not implemented. Default-graph querying is standard; request default_union=True for a union view. Graph-only serializers reject named-graph data rather than discarding contexts.
This is not a complete drop-in RDFLib replacement. It uses the rdflib_turbo namespace and a deliberately small Dataset API. Graph/Store plugins, SPARQL Update, initial bindings, persistent storage, custom functions and remote SERVICE execution are not provided. RDFLib conversions copy data and explicitly preserve caller blank-node identifiers. Query results are eagerly materialized. No performance or complete-conformance claim is made.
Inference and SHACL
from owlrl_turbo import expand
from pyshacl_turbo import validate
expand(data, inference="rdfs", inplace=True)
conforms, report, text = validate(data, shacl_graph="shapes.ttl")
The shared validation path requires this runtime's 0.2.0a1 release, owlrl-turbo 0.1.0a3 or later, and the companion pyshacl-turbo shared-dataset release. Parsing, in-place inference and ordinary validation retain the same native data object. Only the validation report becomes an RDFLib graph. Rules stage changes privately and commit only after success when inplace=True is requested. See the SHACL ownership ADR, the runtime ADR and source provenance.
Requires Python 3.11+. Source builds require Rust 1.98.0. Both project code and extracted inference code are MIT OR Apache-2.0; vendored sources retain licenses. 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 native heap profiler and allocation budget explain phase-level memory measurements and the inference insertion journal.
The shared companion-project benchmark suite
compares parsing, serialization, queries, inference, conversion costs and complete
SHACL pipelines against the reference packages. With all three repositories as
siblings, run make benchmark-companions. It uses pinned published wheels and
separate timing and peak RSS workers; it does not use local editable builds.
Use make dev and make check. The initial alpha is published only by the
verified GitHub Actions workflow; see release instructions.
make dev
uv run --locked --extra test ruff check python tests scripts
uv run --locked --extra test pytest
cargo fmt --check
cargo clippy -- -D warnings
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. Rust branch coverage and dependency/vendored-patch coverage are not measured by these badges.
CI requires 100% measured Python package line and branch coverage. Coverage is separate from full API compatibility and standards conformance.
Metadata
Release files for rdflib-turbo 0.2.0a1
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 | |
|---|---|---|---|---|
| rdflib_turbo-0.2.0a1.tar.gz | 340.5 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| rdflib_turbo-0.2.0a1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| rdflib_turbo-0.2.0a1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| rdflib_turbo-0.2.0a1-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 21.6 MB
Release files / rdflib_turbo-0.2.0a1.tar.gz
| Download URL | rdflib_turbo-0.2.0a1.tar.gz |
|---|---|
| Size | 340.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fa66bd6ae17254059e469239db959651f8fa685796c69b70ee152d9fd43b944
|
|
BLAKE2b-256 checksum How to use checksums |
9c915c21988f4e5299f22f3149d50c07bd4b67ec60fcb2006ef2d50461ae441c
|
| 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 / rdflib_turbo-0.2.0a1-cp311-abi3-win_amd64.whl
| Download URL | rdflib_turbo-0.2.0a1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e58f8efd5d1908f3a9647c57a855af6d3421076985f2c4cf9872529b191ea95a
|
|
BLAKE2b-256 checksum How to use checksums |
061e3d9efaf8bbc4f3fa14913caba157179702a6f86b1b0f7302aa35c35fa6d0
|
| 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 / rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c5523e5899a6667fd36510f7c136ace8d80f87226cc6f025bccedf9b6efd1fbe
|
|
BLAKE2b-256 checksum How to use checksums |
4d426afc6b2523cd1d6c8798f468c75b17b17b64ed90a3eb79421d51cc1823e3
|
| 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 / rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_aarch64.whl
| Download URL | rdflib_turbo-0.2.0a1-cp311-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b76e2de4ad4f3a44c6df1b6ea13a46533fecabe9b73601c17c3035af38072d50
|
|
BLAKE2b-256 checksum How to use checksums |
57890f6f1cd1ba88ea520d08a44c7187021e23c399c92cd2127b911a53662329
|
| 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 / rdflib_turbo-0.2.0a1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | rdflib_turbo-0.2.0a1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d2b087434f4aa5b273f7dd227d766fdd806d7fd8336f7c8cca6f0b6db99cbc9e
|
|
BLAKE2b-256 checksum How to use checksums |
e813a5a6488dda7caf612b2188cecf9e91743cc9e5f065d496190ee7d031b78c
|
| 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 / rdflib_turbo-0.2.0a1-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | rdflib_turbo-0.2.0a1-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
85375aaf86d0501d18a49bde7a13d40258209c0076d881d95fcfbb407cec26f9
|
|
BLAKE2b-256 checksum How to use checksums |
0542b08b9328370e7dff4552a1f4b1e1ca3f68e98152aea04f5e9daa57b19f3f
|
| 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 rdflib-turbo 0.2.0a1
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
All 6 files in this release have been uploaded with provenance metadata.
Attestation for rdflib_turbo-0.2.0a1.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.