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.12.0-cp314-cp314-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.14Windows x86-64

oxiland-0.12.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.12.0-cp314-cp314-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

oxiland-0.12.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.12.0-cp311-cp311-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

oxiland-0.12.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.12.0-cp310-cp310-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: oxiland-0.12.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.12.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 9435b6b7359d0ef4a891032800abe6c81054f472cac144476865579ab5dd6211
MD5 7c762905b77b6974833a1c366f0fd916
BLAKE2b-256 39f7c53071dff15cefb021fdd8b2ca8ae331d6f71d55c4900f43a04ebcbd4934

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0cdeef304e2fb104262c22c5c018ca667d3454a7131393ebfd894f68f6b297e4
MD5 82def31862279b79e936393b5a8dd1ae
BLAKE2b-256 97d292ff20ab2d04a6b5faa2fe49b8ef0f99173d72ba8ac6d70d4686e663b755

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9adf464becfa19350342c47cd9ee09b17c7e8726651d3879be41c832ef8d1313
MD5 048b94cced4183dd7ba5b6f000005106
BLAKE2b-256 fe0ddf38ad28ce901bc38275c86e4c1216faa3356a8db5290fa664a1ea8bd6b5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.12.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.12.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 30541f4fd2f71c5e5aa42aa187b9f077acbea96b93a89760c1edae8fbab6d3f0
MD5 1c51631dc7b2e0a0ae949f29a67f2420
BLAKE2b-256 8c81eb27aaacc2bf0ed29f370495e661b20d45399f6e4a912495de8426f7d37a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d0a410e0a42fa9f61b768f03067c5b4f0ec9af4061aacb7f3348ad7e6d1303d
MD5 e7aa7f7d49e1193da24f2bdd3b9d71ae
BLAKE2b-256 8d2e5aa8769d16ab08f7c511c1055fe6c29911db9bfe78e1e3f113c3307f3881

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 58478df5e477d2fe24a46f314e094eb6aa6e5be74c771349118a19c10d3c8304
MD5 fe6403a4f67e1545bf250d84c00d034a
BLAKE2b-256 4c84eaa3033f11e4db10bc679d9bdb23ecb275746f278949b7c44061e422fc36

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.12.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.12.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 906cdbe5aa2a08e11cb53e33d1dcc0c21e79b963ca6ca0986cea3df03fbdf874
MD5 e3fa540937f55725887c1e82a040db24
BLAKE2b-256 4c2c19a5b32b29a32bc7dd21bc97fc8f5b71b81e775eab5dea7ca941b861afa2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00236657793d0c7c5587d793ac22e1bbef395b7d504ceef9de1faaacdc7b324b
MD5 5e7bdba39b49ec7d390c4dab612392a9
BLAKE2b-256 d095141a1c8f0f93f3c3c6b3b6c5bc8b0b29ecd14b8a7aedcc527947f935bb52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d3ffb10bcdc182249a4bebaac339fc5ac0fb5ff82dbab936dbeb11e516d49c09
MD5 c38d8b9ddae86c4ace49b6ac3c64c305
BLAKE2b-256 b02f40c4c22886a9e200a903ec8f9a05e934b42e99b55988acff98cdfb2fae85

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.12.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.12.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2c800a9be9ebb720ab23d04a90abaaa62ee03cb38bd9f032c53e74e6cb7c0dae
MD5 5d00b193dc255d3b99097375a0890a23
BLAKE2b-256 07c122f149c605f3b0c224496243ee7e0db3967ed4f84c3edcc6c813f0297acd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e21c6e77a332d6cb91063a4b8e3e6eaa4c2242786f2d405a2409d7f5fe727a61
MD5 704d510479b736055f93eaf32315ab82
BLAKE2b-256 eef14eb79731cb3c2d27c65aa1b18eba373413eb73e2ef649788eb128c352a5e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 716c787e90a8a2ec14dd13792ce053863d7d705f7a03945c51537054af930e86
MD5 6afc9a2306191594b9c00df135649959
BLAKE2b-256 52adaad37660428c722c8af13f034fbbc904574853ac971d7dea2dad81202e27

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.12.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.12.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 020a8ba3ba7cb774dd166b304a6f9441b05b391e0999fb0b53cbadd1434de186
MD5 7a201a164d73552f6c2e29f7e5c36efe
BLAKE2b-256 51be18f09793785d65b3611b05cbff350e9c389ee755fa6e4b1aab058473c662

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8050fd1458365f891aa9127980e44c4578861b1fac05a92586c2af4bf36ae54
MD5 06588754d3eb488e46447cc5ed3ec696
BLAKE2b-256 d7a4a44928a55f81f876b20ca681999b17efa1d1f011d53bd00110e7ec41f98c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8b9135dc4a3131bc07206da5627316714d98957fb406916f2dc7dd5c89b6eb4
MD5 d2dfeaea8cf55990be67e259cfc3ad77
BLAKE2b-256 a66fd5487bb0331e81c772e33b54da85d2eaa2c14bc71a11aa44c07a0ddc7122

See more details on using hashes here.

Provenance

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

This release

0.12.0 This release

15 files

0.11.0

15 files

0.10.0

15 files

0.9.0

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