skillfed

sparqlslurper

SPARQL Slurper for rdflib

sparqlslurper v0.5.1 262.3K downloads/30d#8,377 on PyPI5
Permissive license CC0 1.0 Universal Abandoned released

What it is and what it does

SPARQL Slurper bridges rdflib and remote SPARQL endpoints by implementing an rdflib Graph subclass that translates the standard Graph.triples() interface into SPARQL queries. When you call triples() with a pattern, it converts that pattern to a SPARQL query, sends it to a configured endpoint, and returns the results as if they were local RDF data. This lets you work with remote RDF data using familiar rdflib code without manually writing SPARQL queries.

The package depends on rdflib for RDF handling, sparqlwrapper for endpoint communication, and rdflib-shim as a compatibility layer. It includes special handling for blank nodes (BNodes) through optional persistent_bnodes mode and a GraphDBSlurpyGraph variant for GraphDB stores. However, the project has been abandoned since late 2021 with no recent maintenance, so compatibility with current library versions is uncertain.

Use it for:

  • Query a remote SPARQL endpoint using rdflib's familiar Graph API without writing SPARQL manually.
  • Cache and filter RDF data from a semantic web endpoint by translating triple patterns into SPARQL WHERE clauses.
  • Build RDF applications that work with both local and remote graphs using a unified interface.
  • Explore linked data from public SPARQL endpoints (DBpedia, Wikidata) through standard rdflib operations.
  • Prototype semantic web applications that may later migrate between local and remote data sources.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Translates rdflib Graph.triples() calls into SPARQL queries and resolves them against a remote SPARQL endpoint, acting as a caching layer for RDF data.

No—this package is abandoned (last release 2021-12-21, no commits since). While install friction is low and the license is permissive, the lack of maintenance means no fixes for compatibility issues with current rdflib or sparqlwrapper versions. Use only if you are maintaining legacy code already depending on it; for new projects, consider actively maintained SPARQL clients or rdflib's own query capabilities.

Install

sparqlslurper on PyPI

pip

pip install sparqlslurper

uv

uv add sparqlslurper

poetry

poetry add sparqlslurper

Installing sparqlslurper

Before you install

Low install friction with only three runtime dependencies (rdflib, sparqlwrapper, rdflib-shim). However, the package is abandoned—last release was 2021-12-21 with no commits since then, so expect no maintenance or bug fixes.

License in practice

CC0 1.0 Universal is a public-domain dedication with no restrictions; you may use, modify, and distribute the code freely with no attribution or license notice required.

Quickstart

pip install sparqlslurper

from sparqlslurper import SlurpyGraph

graph = SlurpyGraph(sparql_endpoint_url)
for s, p, o in graph.triples((None, None, None)):
    print(s, p, o)

Requires Python 3.7.4 or higher and a working SPARQL endpoint URL to connect to.

Verify before relying

  • Current compatibility with modern rdflib and sparqlwrapper versions (last tested 2021).
  • Whether BNode handling workarounds (persistent_bnodes, GraphDBSlurpyGraph) are production-ready or experimental.
  • Performance characteristics and memory footprint for large result sets from endpoints.

Package facts

License CC0 1.0 Universal (permissive)
Python support supports the current Python release (>=3.7.4)
Install friction low — pure-Python wheel
Runtime dependencies 3 — rdflib-shim, rdflib, sparqlwrapper
Maintenance abandoned — 1,697 days since the last release
Last repo commit
First released
Downloads 262,255/month — #8,377 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sparqlslurper-0.5.1-py3-none-any.whl

Keywords: SPARQL, ShEx, RDF, rdflib

Tags

sparql endpoint clientrdf graph cachingsparql query wrapperremote rdf accesssparql to rdflib bridgesemantic web queryinglinked data endpoint
rdf-semantic-websparql-clientabandoned

More Database packages