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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

oxiland-0.11.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.11.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.11.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.11.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.11.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7e5b15d3372db930ab7af8e984ed8bbd6885f6e3a90cb83585baedd136c16110
MD5 6984719480f389155866defe77e5791c
BLAKE2b-256 1d6d1dfaeffc5ec17c8dfb5131c467d727a7f9454b89b27f9426186e8865feed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43b690ddfcb32bf1afabd1e2366e20c5dc009c39f66ab6880d1b0c053577792e
MD5 b6b4db227a8dcf648adb60b88d7bf65c
BLAKE2b-256 16d14747ee9f988c66950ff1453440db4d6272e7d56c263768ccd161a356d50a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9bc7aeb273f4b3c3f40986ad27c5f86791b62f75a7f85106bee5b34696f6326c
MD5 2fe90ba0ead24fff027dbe22a82d802d
BLAKE2b-256 98231c799f1a816299cc5bfc0ef4c8f9eb26b7149adb5db12b337a2d3f5c9ac5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.11.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.11.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 35006b9d74adfb441e3d3815f51ef44dd23c56c4aee94649a1f0ac3558f8b92a
MD5 0367127bf528d2d7adae34ca4b7e007a
BLAKE2b-256 139206a905de8775005952eee686e83156e50ea39fa110f4df211d6736e8644d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7356933f0fa0596e7918460339a96cd104d976f986497c69d10aa52bd1c8221
MD5 2ecb64d0a2805b131a99f614f900280a
BLAKE2b-256 0dca1859c39ac7ede6c510dfb6df663443cbfe57e69e7857ae3bac3fd80427ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae54ae993e2517880254da89d0ddd61a9fdfaf5ad76fdf02170021c688fea0d9
MD5 80199cb08f46d2dae3e11fb6b9d11958
BLAKE2b-256 69069e375cdef9320f84fd0b60ecdab2cd96aef1b754cde1441af870b6f82e60

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.11.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.11.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 873546c332a90eefef6499f0e0337bf2973322437b107604ff6b794c3910183f
MD5 eeb1d146d388b39c2062b1c74c840a23
BLAKE2b-256 1854dea95aaaa567d4c63fd4a615853036fa429b89d3afb4b0b2fb3cc2c6791d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a74e6f8f4d95138ba361e05a57a644a0fd7c7530a73695ab7a7be2ff22f3d19d
MD5 d6c2e27d6ff23b608bc52aa922ae1c4c
BLAKE2b-256 21f206a36a8c567e859f90fb8ab003525422c4328be206210cc3f305a45606ec

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8afa2034dfd48909550ecca67ade8c023e711e0a3fee1cc3e275bfa7e1a96b10
MD5 03dbb8ed013f1b9a20975c4a3da60a4b
BLAKE2b-256 e4d9dfbb9eeacbfc59e216b734d55cd03b3f4f222867eab5e735791cccd5dc10

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.11.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.11.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32e037b49f9e1f72aef2cf2527609248ff69f621e398d28c0be860f2437760d3
MD5 65293a319c764dd560e389e50dbfbbeb
BLAKE2b-256 70cf830ee40751f415b115ca7b57bfbbb95f9f8811a69397abd5b488159a820b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a48d9757ebcd5c59e8f4634ada5aa81e11c8d2e1d7f3af11107c3b7fe40878f4
MD5 fd81a516db92baf01b07229c9f1848ad
BLAKE2b-256 d693d4ee26c03bfd30a07512afecb73c50a378a0d1876dc390d2d8c3a5c5f254

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89edc6aacb1b96f7ea6589472fafe105a6f8646c6628691a9e7ce6a2b84eb7af
MD5 a6b8b068246d97274a6eb498c7aa872d
BLAKE2b-256 f5e6b5b70cbecc24093f4a2a4e71ab982f90b72dab6b7198d3a5486024a26332

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.11.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.11.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 569ee9c6b883eaecf60fd54db36766aa809d4200706c7177e1034c74ea8aa135
MD5 486e3f55624677f1d956ad62ab9688f1
BLAKE2b-256 b2966867731f7104b023bfc64b64e3689e233c95eb7558d8fe0ed014153c6871

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 836e228f94b6cd80ddf799bde7fe561b98089106fba733eb748a94bc5a49a121
MD5 9fce9249b25ef421344655e256ba5e9a
BLAKE2b-256 a2afc9eb35e2a7f263863197fe861a0176b5f62c8bae702a5a1c623a103f136c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.11.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e697f0e93695d054cb86bcf36d56e2cf7b073fa9357bc224558bc6ea6fbf449
MD5 9bda52aad97e611014da3b74b30c1a05
BLAKE2b-256 b1bec1f4cab60530369d82ec577f8afaf1f765d2828f8a35c2afce989a6ab0aa

See more details on using hashes here.

Provenance

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

This release

0.11.0 This release

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