pyoxigraph
Python bindings of Oxigraph, a SPARQL database and RDF toolkit
What it is and what it does
Pyoxigraph is a Python binding to Oxigraph, a Rust-based RDF and SPARQL toolkit. It offers two store implementations—one held entirely in memory, the other persisted to disk—both capable of executing SPARQL 1.1 queries. The library also includes parsers and serializers for six RDF formats, making it suitable for applications that need to store, query, and transform semantic web data.
The package is written in Rust using PyO3 and built with Maturin, delivering performance-oriented graph operations from Python. It supports Python 3.8 through 3.14 and is distributed via PyPI and conda-forge. The project is actively maintained, with documentation available and community support channels (GitHub discussions, Gitter chat) available for questions.
Use it for:
- Build a semantic search engine that queries RDF triples using SPARQL to find relationships between entities
- Parse and validate RDF data in multiple formats (Turtle, JSON-LD, N-Triples) before loading into a knowledge graph
- Store and query linked data locally without external database infrastructure, using the in-memory store for prototyping
- Migrate RDF datasets between formats by reading one format and writing to another using pyoxigraph's conversion utilities
- Implement a knowledge base application that persists triples to disk and executes complex SPARQL queries over time
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pyoxigraph is a Python library that provides in-memory and disk-based graph databases with SPARQL 1.1 query support, plus utilities for reading and writing RDF data in multiple formats including JSON-LD, Turtle, TriG, N-Triples, N-Quads, and RDF/XML.
Yes, with conditions. Pyoxigraph is actively maintained, permissively licensed, and offers a performant SPARQL implementation for Python with no runtime dependencies. However, it is classified as Alpha, so production use should account for potential API changes. Install if you need embedded RDF/SPARQL capabilities; avoid if you require a stable, production-hardened triple store.
Install
pyoxigraph on PyPI
pip
pip install pyoxigraphuv
uv add pyoxigraphpoetry
poetry add pyoxigraphInstalling pyoxigraph
Before you install
Medium install friction due to compiled wheels; however, prebuilt binaries are available for Python 3.8–3.14 across Linux (x86_64, aarch64), Windows (x86_64, ARM64), and PyPy. Repository is actively maintained with recent commits.
License in practice
Dual-licensed under MIT or Apache-2.0 (permissive); you may choose either license. Both permit commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install pyoxigraph
import pyoxigraph
store = pyoxigraph.Store()
store.add_triple(pyoxigraph.Triple(
pyoxigraph.NamedNode("http://example.org/subject"),
pyoxigraph.NamedNode("http://example.org/predicate"),
pyoxigraph.Literal("object")
))
Requires Python 3.8 or later; compiled wheels are provided for common platforms, but installation on unsupported architectures may require building from source.
Verify before relying
- Performance characteristics and scalability limits for disk-based stores with large datasets
- Comparison of query performance against other SPARQL implementations
- Stability guarantees given 'Alpha' development status classification
Package facts
| License | MIT OR Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 57 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 260,019/month — #8,400 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyoxigraph-0.5.9-cp310-cp310-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp310-cp310-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp310-cp310-win_amd64.whl; pyoxigraph-0.5.9-cp311-cp311-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp311-cp311-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp311-cp311-win_amd64.whl; pyoxigraph-0.5.9-cp312-cp312-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp312-cp312-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp312-cp312-win_amd64.whl; pyoxigraph-0.5.9-cp312-cp312-win_arm64.whl; pyoxigraph-0.5.9-cp313-cp313-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp313-cp313-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp313-cp313t-win_amd64.whl; pyoxigraph-0.5.9-cp313-cp313-win_amd64.whl; pyoxigraph-0.5.9-cp313-cp313-win_arm64.whl; pyoxigraph-0.5.9-cp314-cp314-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp314-cp314-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp314-cp314t-manylinux_2_28_aarch64.whl; pyoxigraph-0.5.9-cp314-cp314t-manylinux_2_28_x86_64.whl; pyoxigraph-0.5.9-cp314-cp314t-win_amd64.whl
Keywords: RDF, SPARQL, graph-database, database
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
rdflibRDFLib is a Python library for parsing,…
permissive · top 1,000 on PyPI
pymanticPymantic parses and queries RDF and semantic…
permissive · top 15,000 on PyPI
pyshaclValidates RDF graphs against SHACL shape…
permissive · top 5,000 on PyPI
pystardogPython client library for querying and managing…
permissive · top 15,000 on PyPI
sparqlslurperTranslates rdflib Graph.triples() calls into…
permissive · top 15,000 on PyPI
owlrlImplements OWL2 RL Profile and RDFS inference…
unclear · top 5,000 on PyPI
SPARQLWrapperSPARQLWrapper provides a Python interface to…
unclear · top 5,000 on PyPI
PyShExPyShEx parses and validates RDF data against…
permissive · top 15,000 on PyPI
rdflib-jsonldProvides JSON-LD parsing and serialization for…
permissive · top 15,000 on PyPI
graspologic-nativeProvides a high-performance Rust implementation…
permissive · top 15,000 on PyPI