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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

oxiland-0.13.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.13.0-cp313-cp313-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

oxiland-0.13.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.13.0-cp312-cp312-macosx_11_0_arm64.whl (3.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

oxiland-0.13.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.13.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.13.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: oxiland-0.13.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.13.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f24880848506729f0fe5aa27c32fe32a01657eb61058336f5cf4e88cda4472df
MD5 ff943a42dbd1935cff122d4bbf93134c
BLAKE2b-256 1ec408143ab155f05c031665d4dfe41645da27e0d8ae3615c3043ff20a2257df

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1cc56160e4784928b463f46a06bc55472c9c3cd438de86f79cd208acc79390b
MD5 5070b37187b7d636832d98fc6a64b48c
BLAKE2b-256 36d30595a7dd5bec5061e766a9f6c9f30d35540b92f08513db8a292995f33c7a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c22a0f422333a9f5c50c6d9ba6a157e5a81722388d4199862286a531a3ff7deb
MD5 30ef050426092ba199a588051b9a7156
BLAKE2b-256 b835c0bdfa1dd3daf12267db9c9e219969f18de5dd9be70692411ce7b4cc698d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.13.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.13.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 150be59eb152d0acf9fccb878a6ed551a3b8b92e4759f3fc0d783778af40a2b7
MD5 8b7bafaa962c2df4e9fe8e17c97edd08
BLAKE2b-256 4e94248b4ebafe126ff8fdcba6294da5bf5c7c4ab3f95d0336adc4772dff4c26

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 202502dd86c32feaa53b607e38b27a4f2dff2f2fc9a30b63f900d602d224f75f
MD5 e4b4ae08e5cdcb58a750ae3973c1dc78
BLAKE2b-256 80658790e96eb2fcc497fdfdcb7e3bc44727f5e39f81be4e3b349a5c9c9957e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c37efca8691c657abdef04db0557d70259dd69cd38ce94ae26d51e210b0e14a3
MD5 5766fa951e472d748a0e369dba8c31b5
BLAKE2b-256 825a151b6bc3ec6f8fd264d8c858a2aabaebdd121a1c492094aa7084d3a6fc13

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.13.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.13.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ccf5d97887e3af67b7c9f8389b1594ab57a80fa77ae393c457c522f785ae0719
MD5 56beb3322b495f4cf5eee25459985284
BLAKE2b-256 efee7c0c13fded6df27762598177404e2fc54567a86439b37127a812aeaf1b3c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03cc9f4fa4dd2d318b306b7eb3ef19271066780bf155b720a25d6a658c410809
MD5 9f530f554c8acaffb4fdac459e5dfc8b
BLAKE2b-256 96455317629ec832d32812e0eee3c888ba09f9dd07a715a0be1ec1b0f0723242

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed31d2aa562bfd088cbb35a4af04af82d69b9ed7752133bbdaab47d3d6cdf977
MD5 f966fdb5299f01407e21a67ac2d63398
BLAKE2b-256 d3379f4601732f68ca2514489c45523001f52d8e17213b3cf18525d440061a82

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.13.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.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 81ab3bc1342e6ce2c0db2525109f7b5451a87f982ad1ad663630458e09b68eec
MD5 33f2630e04fc968c50fc1ecdb1a97cbe
BLAKE2b-256 af82b6f8551121fe0a0a991135eaed20038f0e5d3c517c9e3b171e37ec339406

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1331d95f186923b69f461f06bc6a8db0187671c121b858d5e750c8806ea3e7b
MD5 f3fb95040dc34c941d1da2a050ef34cb
BLAKE2b-256 44ddbeddf28405e55843214bf8ebd5a9c02e5faab92a90c2137a45a0069e1830

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f313ce740db077327c9c533015b142642cdc7dafbcb6ee9a36d1a6888236a7b
MD5 7dd5633a8c4b29fa0547093d47b0da17
BLAKE2b-256 ba2c5bcc80f8fcc578ab30aa656572eac86e6217d8d7d9eec2bff0ccfd58aa66

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oxiland-0.13.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.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6511eb6788b707f462fd9276e03bebef4b79f23de9af0f851dfcb7aab64ad079
MD5 bf051cf49811e85c351dbdb6f2da13e6
BLAKE2b-256 abcfed7e1c0cc6bd0232860f88ce2b3b994d1796af1fdba48fa56651a99b6c3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9cb2db2400a3bb6936a908316737bd9b45c087677e851f782417b76eff97829e
MD5 fcfd411b39f3af0f0047e2f3b8e8234f
BLAKE2b-256 10d8bba62a3407f69ff11abfcadfc5425f9a127dc2eaec5d55f7db0ba209833f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for oxiland-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e47338393bb58bb641e1e2687e66f2cb9f5fa04acc66ce78195827ddc75e8c7b
MD5 eb88fd09cf4e422d323a07670e9a1026
BLAKE2b-256 014d01bd04e5421033e8f636b150e3984ce7316302b588ed7edc084b2fd15c96

See more details on using hashes here.

Provenance

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

This release

0.13.0 This release

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

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