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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

oxiland-0.8.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.8.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.8.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.8.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.8.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 99c33ee5fc294c673b7f1c96f156d756fa6e96e556acd747aefe19b0ce3cdb79
MD5 f35e48357485b20fed0a5a42970e2285
BLAKE2b-256 7ed1df23f0dc71ef609b2a07d39fc0bebea71337ebb8997eea62c71d5b36a312

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15043f89b2981186178f5dc7875c0d47c872feb1fa0f1fbed712405f824c33a1
MD5 d169ca23e1efe6a8174a98ce96997e9f
BLAKE2b-256 24daceeb3e6dc813124a0d29422a8302794a907c55a199fe37130431f7cf496f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aa6bf0ee0456a3c57488cb4f921ac33a16bfa219e3d7634ab1d743ab18f16b72
MD5 9bef007a1fccf48fa87965e533a636e5
BLAKE2b-256 f847138a1b258173bdeed2ef370fa95e0a373abc7e6fc6e58459e6393802978f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.8.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.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f496cf8bed07345e6edf87d9add0540886de6675c9aa221a900b1121bf292633
MD5 b0d2c116a56b00eaddae208197c0ebae
BLAKE2b-256 097773284364a3bfd686ac657df678f95d2bf43aa4a750b9acd041c89693301a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e851af32e1240c9544d063051ecfdf908cd26e2b3fdafaaa41afe677ea9f2dd
MD5 83d68f792f1955bb7771639fd34b5ce6
BLAKE2b-256 bd6f81779bf4adb41bff00969cff1f7e535da6f2d7fa61ca07888010dc6195e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7d683dc56161fa941f69370088f9ae44c1ac01fe6cd0ffb7a7aab9ec05bab57
MD5 1c2e0393a0180d412a9894fcb6db59a2
BLAKE2b-256 bedb610fce2e7ee97ea65668c0162234a0c11f9ad4478981abe0ae8642baee92

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.8.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.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de2d6d2ecf52f86a9bc0e42a63a00bae8dfe485ea790ea2dfcffdc506c415b3e
MD5 62621a4f3b100ede344232f66622bd5c
BLAKE2b-256 5469319caa16be646797027a40ee1f392cd5e4d6852ab74e8e5253b718b27f21

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f41aca8f04e2be4ff5c4639bfd4aa5857bda2a94e4d05e4c7a2e45e9aad8c980
MD5 0107c8490aef1e20f7de6e36b0869d80
BLAKE2b-256 48cddefbf975493090bb450e1e1a9f76b165d26bb1c78c19d10b283b7e023a2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 621f4ecbfc1ab6ea60a68438b9df97c24cca8772946b481e3ed1ab35d28b75ac
MD5 026a37d2a116f0bb8a6fbc3fa1cc6f4c
BLAKE2b-256 5017061e633130a63f769ddb75298597d71e682053e4b3ba6ed79e39e50ddc74

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.8.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.8.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fb9730dfe9ca5c636d207edeff3d17f91c028f354f2a6ecfdc59cf1f2de37480
MD5 7d3225a080f1bb3c94fe4bea42f75940
BLAKE2b-256 fdc4c194c006e339c963358543e2457b3d4c903a9358af753e9303f39915bd4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c47f18fcc5a80beae9a09f3cfe1f452bf2d27548b3168f0070ab97ceb9e2a60
MD5 f5cb8042745664836b5c1d889b174e0e
BLAKE2b-256 a6e589f73d27edfe18ec12701162ef1c367cf06eac3cc6be670c67068add5ce2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64907de44a79cd1d305b7bc259c8c169c015c19efd7a551ad602cc0b8035bf3e
MD5 44f05ec80300726702d4ed853c8e6df2
BLAKE2b-256 28445bafa162bcd53a2fa97d7655c7e68750930ef6b2fd1cffeaefcce157aca2

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.8.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.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f802c7bef977c5c0af8545f7dbfcc916db9531aa794c2f4fbadf2a98c96579ad
MD5 1fc83a4a232b62ca084be64b4d630d83
BLAKE2b-256 88e5e6459eee9e8db743dbe2f1b1d78bc808a836526f83401c6b97059b917fce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96c59ed1af5e1b604193aa130d6f43c0b3b09d714f8f4ad74568724faa9dcb76
MD5 0b64db47fc241912a1f856ff096af62d
BLAKE2b-256 29cdddd7b4cd955fdcc1b1aea8528ee27245263f13156b1f2ce7fb31840f4eb1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5bf46667612cacaf0e87c8d65992a50dee4f11a529b029414f223853b705cb89
MD5 b7b9052602013ce09998704615363b46
BLAKE2b-256 ae60bc4912e793f3c8333982c9d58ad7791438911a8a330c56ef85a5eba2309e

See more details on using hashes here.

Provenance

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

This release

0.8.0 This release

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