skillfed

pyoxigraph

Python bindings of Oxigraph, a SPARQL database and RDF toolkit

pyoxigraph v0.5.9 260.0K downloads/30d#8,400 on PyPI1,817
Permissive license MIT OR Apache-2.0 Active released

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 pyoxigraph

uv

uv add pyoxigraph

poetry

poetry add pyoxigraph

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: Database :: Database Engines/ServersTopic :: Software Development :: Libraries :: Python Modules

Tags

sparql database pythonrdf graph databasesemantic web queryrdf file processinglinked data storagetriple store pythonsparql 1.1 implementation
rdf-sparqlsemantic-webgraph-database

More Python Modules packages