{"id":28028,"library":"oxrdflib","title":"oxrdflib","description":"rdflib stores based on pyoxigraph. Version 0.5.0 requires Python >=3.8, upgrades pyoxigraph to 0.5, adds JSON-LD support, and improves SPARQL query behavior. Development is active on GitHub.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/oxigraph/oxrdflib","tags":["rdf","sparql","oxigraph","rdflib","semantic-web"],"install":[{"cmd":"pip install oxrdflib","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Core storage backend, version >=0.5","package":"pyoxigraph","optional":false},{"reason":"RDF library interface, version >=6.2","package":"rdflib","optional":false}],"imports":[{"note":"OxigraphStore is a top-level export; don't use the old submodule path.","wrong":"from oxrdflib.store import OxigraphStore","symbol":"OxigraphStore","correct":"from oxrdflib import OxigraphStore"},{"note":"The store class is 'OxigraphStore' in oxrdflib; 'Oxigraph' might be a different library.","wrong":"from oxgraph import Oxigraph","symbol":"Oxigraph","correct":"from oxrdflib import Oxigraph"}],"quickstart":{"code":"from rdflib import Graph\nfrom oxrdflib import OxigraphStore\n\ng = Graph(store=OxigraphStore())\ng.parse(\"example.ttl\", format=\"turtle\")\nprint(len(g))\n\n# Query\ng.update(\"INSERT DATA { <http://example.com/s> <http://example.com/p> <http://example.com/o> .}\")\nresults = g.query(\"SELECT * WHERE {?s ?p ?o}\")\nfor row in results:\n    print(row)","lang":"python","description":"Create an rdflib Graph backed by Oxigraph in-memory store. Parse and query RDF."},"warnings":[{"fix":"Use OxigraphStore() for both in-memory and on-disk. To persist data, specify a path: OxigraphStore(path='/path/to/db').","message":"In v0.3.0, the 'OxSled' and 'OxMemory' stores were removed and replaced by the 'Oxigraph' store. On-disk storage now uses RocksDB; migrate by dumping data with v0.2, upgrade, then reload.","severity":"breaking","affected_versions":">=0.3.0"},{"fix":"Use 'ox-turtle' instead of 'ox-ttl', 'ox-n-triples' instead of 'ox-nt', etc.","message":"The legacy format names 'ox-ttl', 'ox-nt', etc. are still supported but the new format names 'ox-turtle', 'ox-n-triples' are preferred and may become default in future releases.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Re-bind namespaces after reloading a store, or store prefix mappings separately.","message":"Namespaces set via bind() are not persisted to disk. They are only available for the current session.","severity":"gotcha","affected_versions":"all"},{"fix":"Review oxrdflib's GitHub issues and test your usage; consider using raw pyoxigraph for advanced features.","message":"The store does not fully implement all rdflib store methods; some operations (e.g., context management) may behave differently. Test your code thoroughly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install oxrdflib","cause":"oxrdflib is not installed.","error":"ModuleNotFoundError: No module named 'oxrdflib'"},{"fix":"Update oxrdflib to the latest version: pip install --upgrade oxrdflib","cause":"Version mismatch; OxigraphStore was added in v0.1.0.","error":"ImportError: cannot import name 'OxigraphStore' from 'oxrdflib'"},{"fix":"Use graph.query() instead of store.query(). See quickstart example.","cause":"Query is performed on the Graph object, not the store directly.","error":"AttributeError: 'OxigraphStore' object has no attribute 'query'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}