Skip to content

Use `sparqld` from Python

Provide import sparqld through a thin native Python binding to the shared Rust dataset and query API. Python applications should load a project and run SPARQL without starting an HTTP server.

Acceptance criteria

  • Expose a documented dataset lifecycle and query API. Define Python result types and surface load and query errors as Python exceptions.
  • Reuse the Rust library's loading, catalog, source graph, default graph, and query behavior.
  • Support repeated queries against the same dataset and define reload or watch behavior.
  • Build and distribute installable wheels for supported Python versions and platforms. Verify a clean installation without a separately installed sparqld executable.
  • Test SELECT, ASK, and graph queries against real fixture directories, errors, and parity with existing interfaces.
  • Document a runnable Python example and review the MkDocs documentation.

Prerequisite: https://github.com/iolanta-tech/sparqld/issues/62.