Installation

Requirements

Requirement

Version

Python

3.10, 3.11, 3.12, or 3.13

SparqlModel

0.13.1 (current release)

TripleModel

>=0.12.0,<2 for SparqlModel 0.13+ (>=0.10.0,<2 on older releases; installed automatically)

Pyoxigraph

>=0.5,<0.6 (installed automatically)

PyPI

pip install sparqlmodel

Verify:

python -c "import sparqlmodel; print(sparqlmodel.__version__)"

Optional extras

Extra

Install

Provides

(core)

pip install sparqlmodel

MemoryStore, SPARQLSession, query compiler

http

pip install "sparqlmodel[http]"

HttpStore, AsyncHttpStore (requires httpx)

fastapi

pip install "sparqlmodel[fastapi]"

SessionDep, AsyncSessionDep, lifespan helpers, RDF responses

Combined

pip install "sparqlmodel[http,fastapi]"

Remote store + FastAPI integration

Note

fastapi extra includes httpx because HttpStore and lifespan helpers depend on it.

Development install

From a clone of sparqlmodel:

git clone https://github.com/eddiethedean/sparqlmodel.git
cd sparqlmodel
pip install -e ".[dev,http,fastapi,docs]"
pytest

If you see many PytestRemovedIn9Warning messages about ensure_greenlet_context, uninstall the unrelated pytest-green-light plugin from your environment (this repo already disables it via -p no:green-light in pyproject.toml).

Build documentation locally:

cd docs && make html
# open _build/html/index.html

See Building documentation locally for Read the Docs and CI details.

Version pinning

For reproducible deployments:

sparqlmodel=={{ version }}
triplemodel>=0.12.0,<2
pyoxigraph>=0.5,<0.6

Track releases on PyPI and the Changelog.