Skip to main content

Oxiland for Python

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 in 0.7.0

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. In 0.7.0, 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.7.0-cp314-cp314-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.14Windows x86-64

oxiland-0.7.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.7.0-cp314-cp314-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

oxiland-0.7.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.7.0-cp313-cp313-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

oxiland-0.7.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.7.0-cp312-cp312-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

oxiland-0.7.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.7.0-cp311-cp311-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

oxiland-0.7.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.7.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.7.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.7.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.7.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 de9ba38ac1aabaa8eb6ead44854969e00b09a3d4b67e1893ee2b10b1e4605dfe
MD5 bdded2f91bc8e25958547c1efc181d02
BLAKE2b-256 d4a2f13e052b449dd7e980f7daca75b4a30d967b2341d593b1d0c78f415f7b0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af7e908a1e45e52720c2c208c53efb8a5ecb6a4c3f15bbdd4f26576c2b805fce
MD5 ca99315a38ed6ac6b80301f81e4219cd
BLAKE2b-256 f73056d91458b7d49dbe1973629c13aef3d9c5a181f7067fe548f10ac47b1f67

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc915397e4d3d530ce29adc3e9eb4e66d4bd41af482729cd4ab82b791eebafa7
MD5 0d3182a8f1ec088dc062176e594ad7f4
BLAKE2b-256 88f8b58c8ced9e4ed502ffbf1e2099c8aa238ce5b0d76be16c78dff2ffc3e372

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.7.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.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1d738c27c07b513f05b2b8beadf420ca6a58c9b06093180e7ff7d8c3b8267808
MD5 3fc3bc074c3dfec570b7da445b3274de
BLAKE2b-256 dabe6099e7be1059f6980be9bcb032cd21189754c0c5ecc09cce7d975d5c7d72

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e56420c33f643e63d28f0fa8a1167d77ae7601b0162313b3190cdcb2b43214e
MD5 b46bd486bc1dddb1ad1cb98b867a7880
BLAKE2b-256 08a4a1c874b74ab7ecbcd4524fa0785432ca03281f4bd7c6fc9b67fcaf7d195a

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92142be6a11c3e1aa7205a3016fa9646ebf2ae3e6cf01c4fb8ea3b2c87b3e1ba
MD5 654b611598b0ce733c88f6949788ed29
BLAKE2b-256 c344559beb0cbf013664af8adc96b62f0cd5310f4c906b229abab50f6321aaec

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.7.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.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f42cff1a1c7a0b16e9e87a34a2425f7ae6f19ec077c8bcabadb6dfbe85be1399
MD5 01c7222cc721a98afe0d10f9b38f80fa
BLAKE2b-256 88a75d41c43a1b5f83acdde8a8034aa6cc9f58af8790e3c5978364a538c2615a

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dff631eccf90f2599557991cd28ea8a8db22645aa8d885b77a5f97f1272046e7
MD5 471ed1daad7596e954d1f2e01768ab3f
BLAKE2b-256 13b403fcc424be91be9489491430c9cb1348049648d70aaae7c3257328043755

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f608d24e5439c2dbcc0063478be2c796cc0a451e43236154f22d34a90f55b816
MD5 158102ac4ee896bcf05ea39d47fef076
BLAKE2b-256 e426567b87e1cc4b87de5e665f56d5c67c088995a542c45957a14d324ae5dc4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.7.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.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9c196a7ad22f0c2c7e3332ac80ba4f3a753e1055a3b45bdd2cf408a218fcc25a
MD5 feafdcdba239d461e16bdd0599abf150
BLAKE2b-256 98c72ca3de6355d66628abeefd167e590fd479f79ca506d26a14873f5bc4fd2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0dfdff945b934c74aaf26352e41ed9dde8cabaf9839eb5f008a62f9cb425dac3
MD5 84439766e03e84b8f14e5a883704385c
BLAKE2b-256 c2fcb02ef00d4351dbea6a4f829da9b289575920a30c119ff1b26fbf9cf72585

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1839b0d0857d820c9aa782c16f5704c676d2086a9e587840318587bf24a1f0a9
MD5 344d92ac23516866501f746f0e3f0e07
BLAKE2b-256 bd8113afbbcff22c5dd86246d32b40db4b0196c65b99e7a0962275fdf29ebb26

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.7.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.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 62fdb800dff36103f9f86b44bc6a00a67ca59b7699eff522f4e81a192ea48270
MD5 6f5dc79f28406daddf5adadcf09e6abc
BLAKE2b-256 56806085b3fbd22b4f4fc87a3d1b08c4b34fc9da614e1afb66f458d9590fdcd8

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a78ebd7d8327c684eb78da4ed05be371cc1c9c4c8d664eb63a4fe16572629232
MD5 5cefa817b922be545fcd9288bb95dd6f
BLAKE2b-256 5e35218b38d7be55d8f3ac26c148f66789afdd617761ff4325233b22b65129c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for oxiland-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b693a723c4e3ac655e7d676439258254ffbb7c0e194fb32af76abfcf9f199959
MD5 be018295d4309d10418febfc92946ba2
BLAKE2b-256 d1fee7861444d189497691ad71ecb26fd2685a7db4960da2955df0eda0dd51cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for oxiland-0.7.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

0.9.0

15 files

0.8.0

15 files

This release

0.7.0 This release

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