Skip to main content

Oxiland for Python

CI PyPI Python versions Guides License

Oxiland is a typed Python library for working with RDF datasets. It combines an in-memory or persistent model, named graphs, SPARQL 1.1 queries and updates, and streaming RDF input in one dependency-free package.

python -m pip install oxiland
from oxiland import Literal, Model, NamedNode, Triple, query

EX = "https://example.com/"

model = Model()
model.add(
    Triple(
        NamedNode(f"{EX}alice"),
        NamedNode(f"{EX}name"),
        Literal("Alice"),
    )
)

for row in query(
    model,
    f"SELECT ?name WHERE {{ <{EX}alice> <{EX}name> ?name }}",
):
    print(row["name"].value)

What you get

  • native RDF terms with validation, value equality, and hashing;
  • default-graph and named-graph CRUD;
  • in-memory models and local persistent stores;
  • atomic write transactions with rollback on exceptions;
  • ASK, SELECT, CONSTRUCT, DESCRIBE, and SPARQL Update;
  • streaming parse, match, and query-result iterators;
  • Turtle, N-Triples, N-Quads, TriG, and RDF/XML;
  • PEP 561 type information for Pyright, mypy, and IDEs;
  • typed exceptions for RDF, parsing, SPARQL, storage, and I/O failures.

Oxiland has no required Python dependencies. Published wheels contain the native engine and the complete Python API.

Compatibility

Requirement Support
Python CPython 3.10–3.14
Operating systems Linux, macOS, and Windows wheels
Typing PEP 561 marker and bundled stubs
Distribution Binary wheels; no source distribution on PyPI

Installation succeeds only when PyPI has a wheel matching the interpreter and platform. See the installation guide for deployment and source-build guidance.

Persistent datasets and transactions

Use Model.open() when the dataset must survive process restarts. Paths accept str and os.PathLike values.

from pathlib import Path

from oxiland import Literal, Model, NamedNode, Triple

store = Model.open(Path("var/data/catalog"))

with store.transaction() as tx:
    tx.add(
        Triple(
            NamedNode("https://example.com/product/42"),
            NamedNode("https://schema.org/name"),
            Literal("Desk lamp"),
        )
    )

store.sync()

The context commits as one unit when it exits normally. An exception discards all buffered operations. Nested transactions on the same model are rejected with UnsupportedError.

RDF input and output

from oxiland import Model, load_path, serialize_path

model = Model()
loaded = load_path(model, "catalog.ttl", transactional=True)
serialize_path(model, "catalog.nq")
print(f"loaded {loaded} statements")

parse() and parse_path() return lazy quad iterators. load() and load_path() provide progressive, collecting, and transactional import modes so applications can choose memory usage and failure atomicity explicitly. An N-Quads or TriG file containing arbitrary named graphs cannot be imported as one dataset. Load one compatible graph at a time with graph=; dataset-target parsing is not yet exposed in Python.

SPARQL

from oxiland import query, serialize_results, update

exists = query(model, "ASK { ?s ?p ?o }")

rows = query(
    model,
    "SELECT ?s ?p ?o WHERE { ?s ?p ?o } ORDER BY ?s",
    limit=100,
)
for row in rows:
    print(row["s"], row["p"], row["o"])

json_results = serialize_results(
    model,
    "SELECT ?s WHERE { ?s ?p ?o }",
    "json",
)

update(model, 'INSERT DATA { <https://example.com/s> <https://example.com/p> "v" }')

ASK returns bool; SELECT returns a lazy SolutionsIter; CONSTRUCT and DESCRIBE return a lazy TriplesIter. Unbound selected variables have the value None.

Error handling

Catch the narrowest exception that your application can recover from:

from oxiland import OpenStoreError, ParseError, StorageError, load_path

try:
    load_path(model, "incoming.ttl", transactional=True)
except ParseError as error:
    print(error.location, error.message)
except (OpenStoreError, StorageError) as error:
    raise RuntimeError("RDF store unavailable") from error

All package exceptions inherit from OxilandError. Parse failures expose message and location; store-open failures expose path and message.

Documentation

Oxiland is powered by a native implementation for predictable performance, but its public Python API, typing contract, errors, documentation, and release artifacts are maintained as a first-class package. It is not an rdflib compatibility layer; integrations should use the documented Oxiland types.

License

Apache-2.0 OR MIT

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

oxiland-0.9.0-cp314-cp314-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.14Windows x86-64

oxiland-0.9.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

oxiland-0.9.0-cp314-cp314-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

oxiland-0.9.0-cp313-cp313-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.13Windows x86-64

oxiland-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

oxiland-0.9.0-cp313-cp313-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

oxiland-0.9.0-cp312-cp312-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.12Windows x86-64

oxiland-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

oxiland-0.9.0-cp312-cp312-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

oxiland-0.9.0-cp311-cp311-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.11Windows x86-64

oxiland-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

oxiland-0.9.0-cp311-cp311-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

oxiland-0.9.0-cp310-cp310-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.10Windows x86-64

oxiland-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

oxiland-0.9.0-cp310-cp310-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file oxiland-0.9.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.9.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oxiland-0.9.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bf5fba549ac33703a2ecc6d409cc6f925216af6addb28ea8a397dc7521a24320
MD5 ba9c9f8570de5fee84f3594728c4caf5
BLAKE2b-256 69a0b18f17c11a88703e6c9c2e12ca407ae190daef7f0b02de3d44b7b74512b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp314-cp314-win_amd64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af0591ec0ab7e4a356d1ba203beef603ab5273b867e019ef8c726ed34494c032
MD5 18fed812d14a88d4cee9350fe8bb1a8a
BLAKE2b-256 78f786e06bb2f98cb45d69e381343733eca18d41fe03e3ac1ca96487470599e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c724d4457ef26a6fb44846df8ec9e080f6bf5b581f4ff1a365dbcbb21c4839fd
MD5 13b3a2799c2efc1151cc815a8075005e
BLAKE2b-256 b0e65d2fd5f0ad6c2ae5f1d96cfd2578a1a36c033708184478ec408326df8002

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.9.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oxiland-0.9.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 60414fb04aef169251800aa1a72bafe92f1004082e6410bff93d64b9974f0864
MD5 afd6dc8769156ccfaafac3d95557c0b3
BLAKE2b-256 3f6904887f956da08c053c72a0496bf5716c870419a578e8b1670a7587c98f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 477bca82d1dc77797c0605e9cf0d8e651d4b6752d4cf747f482d1175b571dca4
MD5 02454bc4123416a15955df5e2b66079e
BLAKE2b-256 98da09242c1c43d2b5a01b992c07d1ef97996ada6ab8da76dd2d3eccd92be06e

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e76a74a22d5cd9083321783d62abdf95b21d2aba1ea2c8859bf84f5b637bfbf4
MD5 d9ba20d74f305f04d45355770f74c86e
BLAKE2b-256 3055130d10c4ba4db8c21ce1f9e31438b789253c8ddd22ad57dfd2f1843f05ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.9.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oxiland-0.9.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ab6c0302290d051ad4c54db40ce992a9370eadb0b0c5a0043c7a563ac1fbcdc8
MD5 9d5bb2e6b3a7969701fd37bd6daa139f
BLAKE2b-256 78da310d6a8ab70ebb17a717dd288ac33d53c6878e94838a2dd2cf09c9febcb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp312-cp312-win_amd64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7b984fa80a5d2753440c61e1db207e6ed63b45172518374898bec1c47d1809d
MD5 4b3ad4700b3751a7eacfd0c06b5b6747
BLAKE2b-256 984ac5acfe257c44dd801709ce16ebd388a2f8600ce6b4e4346adcb77472c3b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa1992f171c23ab99e1bb49df36f585f213cef8649188e6ec16a667b02146f93
MD5 f969d83aeada3d8168073a814916a751
BLAKE2b-256 a686d037401c5b496db200d44a252a4bcc6659a4eb9e21221d030ccffab5be02

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.9.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oxiland-0.9.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 11271cb11ffe3d6cfe59b726c781d2ceef7e0b6412f7d0901c17684d606c8587
MD5 86732198779ad1d0169bdbe87d4dd5ac
BLAKE2b-256 032f8ea8250b4dd2f9c47fcc24c4b14ccd2c2716ea8146d4f2efc8265320fab6

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp311-cp311-win_amd64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6d1632f3d1fc7972d6974015113e7f8bc56c6b929fea791378fde28bc5b9eaf
MD5 2c24249661c3a151007e82bd3ccb582e
BLAKE2b-256 5e4e413b41d70477d9ec26f49c784723cda22f2ca90ad9f0013f448a0d02fdab

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 becc06409674c3c463cedac0b1c88349bd6b14822edbc52eb0c345b3857ca67e
MD5 3cd738836c36dea9706897297ae9e5b7
BLAKE2b-256 f32e070047f758b855446028b4d8d12841d66abfbfdb877c5645809f23ab1619

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.9.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for oxiland-0.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 20a3726a5b4890e6e446e1c57cea309d4270604b0bdb5e54948056c701dd5d94
MD5 02c8652a7f5129489c2a604388d633d9
BLAKE2b-256 5abeb8701143462fd2c83ec8d5330b898191569c70d5db0c85359579b0d9a1bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp310-cp310-win_amd64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7523752c0f6a94507d3111fbf17cbcaab80c701b2118de02c977aa89eca5a3bd
MD5 2c39d323816414e4176ac0d138d5ce32
BLAKE2b-256 178fec683fd683d34886b292cb0555d818e137a72b67383192423150aa9f6229

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oxiland-0.9.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0bb1f31f71d320a3fc2b65e168261d1ebaac3b8dc8ce0d756d96ff8a148aa09f
MD5 217025a72f7373d1984e9ff14fca4fc3
BLAKE2b-256 ca10f718041a08d7e355f715233ada4babe678922d0bcfdf9fa829ee8e420ad4

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.9.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on eddiethedean/oxiland

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.13.0

15 files

0.12.0

15 files

0.11.0

15 files

0.10.0

15 files

This release

0.9.0 This release

15 files

0.8.0

15 files

0.7.0

15 files

Supported by

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